Require_once './config/conn.php '; $asin = ' 6007-00a '; $sql = "Select T. ' Item_code ', T. ' Package_area ', T. ' Asin ', T. ' SKU ', b . ' Pack_weight ' from ' 1_sku_comparison ' t left joins ' 1_product ' B on t. ' Item_code ' =b. ' Item_code ' WHERE t. ' SKU ' = ' ". $asin." ' OR T. ' ASIN ' = ' ". $asin." ' OR T. ' Item_code ' = ' ". $asin." ' "; $query =mysql_query ($sql); $rs =mysql_fetch_array ($query); $num = Mysql_affected_rows (); Echo $sql. "
"While ($rs =mysql_fetch_array ($query)) {echo $rs [' Pack_weight '];echo $rs [' Item_code '];echo $rs [' Package_area ']; echo "
";}
This statement can find the record in phpMyAdmin, I execute this statement in PHP but I can't find the record.
Reply to discussion (solution)
Do you have any error messages?
If the result is only one, then you can not get the output!
Remove the $rs =mysql_fetch_array ($query) from line 7th;
When you loop through the data, you start with the second data and comment out the seventh line
fainted, one more