<?php
include"include/db.php";
$sql=mysql_query("select * from order where user='".$_SESSION['user']."' and flag=0") or die(mysql_error());
$i=0;
$sum=0;
$sum2=0;
while($rows=mysql_fetch_assoc($sql))
{
$sum2+=$rows['tedad'];
$sum+=getproductPrice($rows['pid']);
echo "<tr style=\"border:#00CCFF thin dotted\"><td><img src='images/bullet_delete.png' ></td>
<td align=center>".$rows['tedad']."</td>
<td align=left>".getproductPrice($rows['pid'])."</td>
<td align=right>".getproductName($rows['pid'])."</td>
<td align=center>".++$i."</td></tr>";
?>
This is my code, how do I correct it wrong my error is :
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 'order where user='zahra20' and flag=0' at line 1