I am trying to retrieve some data from a my host's database (using MySQL 4.0.24 and PHP 4.4.1), and so far I can already connect and insert data into it and pretty much do the basics, except i keep getting this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/xxxxxx.com/xxx.php on line 34
I already checked for spelling errors and syntax errors, but here is the clip of code anyway:
$xxx = mysql_query("SELECT * FROM forum");
$row = mysql_fetch_array($xxx);
while ($row) {..*code*...}
The database table is named correctly, and the data is in the database and everything. But for some reason I still get that "mysql_fetch_array()" error.
The code works when I use my own sql server and localhost, but I need it to work on my host's server, and I don't have access to the host server's settings. Again, I already can connect and do most of the stuff on the database; just can't get mysql_fetch_array to work. please help?
2007-04-02
15:50:57
·
4 answers
·
asked by
Eurypt
2
in
Computers & Internet
➔ Programming & Design