I am trying to use two inner join as foreign key.
Actually, I have transaction table and this table will be inner join customer and product.
When I make SQL, it occurs error, ‘You have an error in your SQL syntax’.
Could you check my SQL syntax for php mysql?
I cannot find error on my eye.
Please help me, and thanks.
$sql = mysql_query("SELECT T.transactionId, P.product_name, P.product_price, P.stock, C.firstName, C.address, C.postCode " +
"FROM transaction T " + "INNER JOIN customer C ON T.customerId = C.customerId " +
"INNER JOIN product P ON T.productId = P.productId");
It looks like you are using a plus sign instead of a period to concatenate your sql query.