Re: [PHP-DB] numeric string to single digit array

[email protected] (Evert Lammerts)
Newsgroups php.db
Message-ID <[email protected]>
> Tried that as well and got the same result. 
> I tried "Select count(answer) as total from answers where studentID='A123456789'";
> from the CLI and got total = 2 as a result.  
>   

So, we got rid of the Invalid Resource error and we know that the 
student id you use occurs in both rows in your table and that your query 
works fine.

Did you get rid of the semicolon @ line 15 "while($row = 
mysql_fetch_assoc($result));", as Jason suggested? Also, an:
error_reporting(E_ALL);
at the top of your code might help in backtracing.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.