Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1 (no replies)

$
0
0
<?php
function display_content($link,$from=0)
{
$sql="select * from bkc_table order by date desc limit $from,10";
$result=mysql_query($sql,$link);
if(!$result){
echo mysql_errno($link).":".mysql_error($link);
}
$msgnum=mysql_num_rows($result);
for($i=0;$i<$msgnum;$i++){
$row=mysql_fetch_array($result,$link);
?>
<tr <? if($i%2==0) echo 'bgcolor="#CCCCCC"' ; else echo 'bgcolor="#99CCFF"';?>><td width=20%><?

echo"<img src=images/$row[phopo].JPG>";
echo"<td width=80% bgcolor=#CCCCCC >貨物種類:$row[species]&nbsp;&nbsp;&nbsp;
貨物主用料:$row[material]&nbsp;&nbsp;&nbsp;
貨物主顏色:$row[color]&nbsp;&nbsp;&nbsp;
貨物長闊高:$row[size]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
價錢:$row[sellmoney]&nbsp;&nbsp;&nbsp;</td>";
echo"</tr>";}}


?>



who can help me??
1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\bdb_func.php on line 9

Viewing all articles
Browse latest Browse all 1957


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>