I'm trying to compare data from my table and another table together at the same time.
<?php
$check="select * from A where si='".$user."' and code = (select synpr from user)";
?>
I'm trying to compare data from my table and another table together at the same time.
<?php
$check="select * from A where si='".$user."' and code = (select synpr from user)";
?>
You are missing a where condition in Code.
But what are you trying to compare? like does the user in synpr has to be the same user as si?
if so
SELECT * from A where si='$user' AND code = (SELECT synpr FROM user WHERE user='$user');
But since you are selecting synpr in Code, then i have no clue what you are trying to compare exactly. Anything else u can tell us with what you are trying to achieve?