Hell there when i try and connect to pull thing out of the database i get the following error:
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
Bu sitede diğer yanıtların hiçbiri çalıştı.
Burada betik:
<?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=\"download.php?mp3=".$name."\">DOWLOAD</a></td>
<td width=\"17%\">|||||</td>
</tr>
";
}
?>