Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Warning: mysql_fetch_array()

Codes here !

Moderators: macek, egami, gesf

Warning: mysql_fetch_array()

Postby JawdS » Fri Nov 16, 2012 10:58 pm

Hi guys,
Im getting this error when I visit my website:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a3651864/public_html/footwear.php on line 96

Heres My code:
$query = mysql_query("SELECT * FROM Products WHERE cat='Skate' AND subcat='Footwear' LIMIT $start, $limit_img ");
$limit_img = 24;
$start = 0;
$cols = 3;
$cols_td = 0;
$images = $row['photo'];
$product = $row['product'];
$price = $row['price'];
echo "<table width='95%'><tr>";
while ($row = mysql_fetch_array($query)){
echo "<td><div align='center'>$row[product]</div></td>";
$cols_td = $col_td + 1;
if($cols_td == $cols){
echo "</tr><tr>";
$cols_td = 0;
}
}
echo "</tr></table>";

Thanks In advance for the help,
JawdS
JawdS
New php-forum User
New php-forum User
 
Posts: 1
Joined: Fri Nov 16, 2012 10:32 pm

Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron