my code is not working plzz help me out
Posted: Wed Jul 09, 2008 11:42 pm
CODE
{
mysql_connect('localhost','username','password');
mysql_select_db('some database');
$res=mysql_query("select dept_name from dept where deptid=1);
echo $res;
}
i tried to print value of res variable but it is showing output as "RESOURCE ID #4" or some value followed by resource id
but "i think the value shud be the value returned by mysql_connect function'
i donno why actual value of $res is not shown
so kinldly work on this and let me know how to print the actual value of $res
{
mysql_connect('localhost','username','password');
mysql_select_db('some database');
$res=mysql_query("select dept_name from dept where deptid=1);
echo $res;
}
i tried to print value of res variable but it is showing output as "RESOURCE ID #4" or some value followed by resource id
but "i think the value shud be the value returned by mysql_connect function'
i donno why actual value of $res is not shown
so kinldly work on this and let me know how to print the actual value of $res