Is there anything wrong in this? Someone knows why I'm getting the error on line 2nd?

I have connected with the database but,
Is there anything wrong in this? Someone knows why I’m getting the error on line 2nd? that is $get_school_name = mysql_fetch_array($get_school_name); everytime.

I don’t know what’s the problem…
:confused:


$school_id =1;
$get_school_name = mysql_query("select * from tblSchools where id=$school_id LIMIT 1");
$get_school_name = mysql_fetch_array($get_school_name);
return $get_school_name[school_name];

Error is coming

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource on line 2

Thanks I solved it.
Due to my silly mistake, there was no field by the name id in tblSchools.