hi i got another syntax error in a script that i am fixing to add onto my main site can someone take a look to see whats going off
this 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 'and main_image = '1'' at line 1
but in my coding for that section it has the following
<?php $user_image = mysqli_query($conn, "select * from user_images where user_id = ".$userid." and main_image = '1' ")or die //error line
(mysqli_error($conn));
exit();
$fetch_image = mysqli_fetch_array($user_image);
if($fetch_image['user_image']!='') {
echo '<img src="../images/user_images/' . $fetch_image['user_image'] .'"height="100px;" width="100px;"/><br/>';
}else {
echo '<img src="../images/blank_big.jpg" height="100px;" width="100px;"/><br/>';
} ?>
any help would be much appreciated and ty again