A very strange thing is happening to me when trying to program a simple script
in this query
$sql = " SELECT `user_id` FROM `shocc_gallery_info` WHERE `id` = '$gid' ";
$query = mysql_query($sql) or die(mysql_error());
$result = mysql_result($query);
echo $result;
$result does not return a result
but if i do it this way
$sql = " SELECT * from `shocc_gallery_info` WHERE 'id' = '$gid' ";
$query = mysql_query($sql) or die(mysql_error());
$result = mysql_fetch_array($query);
echo $result['user_id'];
Now that will print the user ID
i dont understand why just a simple mysql_result wont work ...... Why should i have to call an entire array?