I give in to Vincent on this one. Sometimes I can make it work and sometimes I can't. Take this code for example:
if($s_pre)
{
$query = "select s_id from tbl_skill where s_name like \"$s_pre\"";
$pre_id = mysql_query($query);
* $pre_id = mysql_fetch_array($pre_id);
$pre_id = $pre_id["s_id"];
echo $pre_id;
}
This is causing the following error:
Warning: Supplied resource is not a valid mSQL result resource in /www/verlynia/school/skillpost.php on line 23
The problem I'm having is that sometimes this will cause an error and sometimes it won't. What am I doing wrong? I don't know if this makes a difference, but the query here should only ever return one line. Never more than one.