I’ve put my test script up on the server, and the error I’m getting makes no sense to me:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/joe/querytest2.php on line 39
This is the PHP line, with some before and after lines…
[code=php]
function make_fill_table() {
$sql = “SELECT item, picname, thumbname, itemdisc, itemprice, itemstatus, FROM $table_name ORDER BY item DESC”;
$result = mysql_query($sql);
if (!result) {
print mysql_error() . “ERROR – query failed”;
}
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$content .='<tr>’;
$content .='<td align=”center”>’;
and here is the DB opening stuff (with personal info xxx’ed)
[code=php]
$dbh=mysql_connect (“localhost”, “xxxxx_joetest”, “password”) or die (‘Cannot connect to Database – error: ‘ . mysql_error () );
mysql_select_db(“xxxxx_joetest1”,$dbh);
Any thoughts? What have I done wrong.
I’m trying to select from Database xxxxx_joetest1, from table audubon.