|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Another mysql_num_rows() problem from newb :(
Hi Guys,
I searched the forum but couldnt seem to figure it out for myself due to me not using sql before ![]() A friend of mine made a database which was linked to WBB permissions. now I'm trying to get it to work with vbulletin but getting the error : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource . here is the code if ($HTTP_COOKIE_VARS['XXX'] && $HTTP_COOKIE_VARS['XXX']) { $userid = $HTTP_COOKIE_VARS['XXX']; $a1 = mysql_db_query($phpdb,"SELECT * FROM XXX WHERE userid = '$userid'"); if (mysql_num_rows($a1) == 1) { $cpass = mysql_result($a1,0,"XXX"); if ($cpass == $HTTP_COOKIE_VARS['XXX']) { $username = strtolower(mysql_result($a1,0,"XXX")); |
|
#2
|
|||
|
|||
|
Ok, I feel this is what you want to do with the script:
1. check if the two cookies are set. 2. If set, you want to use the values stored in those cookies(Eg: username and passwords) to run some query. Now what I feel is that to check if the cookie is set, you may use the inbuilt isset() function. More info about isset() at tizag.com/phpT/phpsessions.php |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Another mysql_num_rows() problem from newb :( |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|