Hi can you please help me in this, I don't know where my error is. here is my code:
$capacitance =@mysql_query ("SELECT DISTINCT wwpn, SUBSTR(val, 1, LENGTH(val) / 2) as capacitor,
SUBSTR(val, LENGTH(val) / 2+1) as capasitance
FROM bom_csv where boardnumber ='$board' and qty<>'' and qty !='qty'");
@mysql_query($capacitance,$connect)or die("Failed to execute query:<br />" . mysql_error(). "<br />" . mysql_errno());
while($row = mysql_fetch_array($capacitance))
{
$capacitor = $row['capacitor'];
$capacitance =$row['capasitance'];
$adi_pn = $row['wwpn'];
}
and the error while I am executing it by php:
Failed to execute query:
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 'Resource id #4' at line 1
1064