Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource

qberty

New Member
Hell therewhen i try and connect to pull thing out of the database i get the following error:\[code\]Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/content/49/5548763/html/matt/download.php on line 17\[/code\]None of the other answers on this site worked.here is the script:\[code\]<?php$con = mysql_connect("XXXX", "name", "password");if (!$con) { die('Could not connect: ' . mysql_error()); }$db_selected = mysql_select_db("nameofdb",$con);$musictable = "";$sql = "GET * FROM matt";$result = mysql_query($sql,$con);while($row = mysql_fetch_object($result)) {$id = $row->id;$name = $row->name;$update = $row->update;$length = $row->length;$size = $row->size;$musictable .= " <tr> <td width=\"63%\">".$name."</td> <td width=\"10%\">".$length." / ".$size."</td> <td width=\"10%\"><a href=http://stackoverflow.com/"download.php?mp3=".$name."\">DOWLOAD</a></td> <td width=\"17%\">|||||</td> </tr> ";}?>\[/code\]
 
Back
Top