|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
superman Smarty Rookie
Joined: 08 Jul 2003 Posts: 11
|
Posted: Tue Jul 22, 2003 1:43 pm Post subject: count |
|
|
is this code correct? but i got this error message 'Resource id #2'
<?
$Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$result=mysql_query("select count(StaffID) from LeaveApplication1 where StaffID = 'fui'") ;
echo "$result";
mysql_close();
?> |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Jul 22, 2003 6:51 pm Post subject: |
|
|
@messju: YES, the above does correctly printout the fact that mysql driver returns a RESOURCE, but if that's what was desired, we probably wouldn't have heard about it.
I don't think it is correct in that he probably wants to read the CONTENTS of $result using one of the mysql_* functions (as you suggested).
@superman: Anyhow, its still not Smarty but I suggest you read AT LEAST the PHP man page for MySQL. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|