![]() |
Help comparing a table value to a variable
I am trying to get a value from the VB database and compare it to a string submitted in a form.
The custom form takes an input from a form ($name). I want to compare $name, which will be an alphanumerical string, to userfield.field3 which is also an alphanum. I have tried the following code but I get Resource id #18 instead of the actual value stored in the DB. Code:
$name2 = $db->query_read("SELECT field3 FROM " . TABLE_PREFIX . "userfield WHERE userid = " . $vbulletin->userinfo['userid'] ); |
If this is on a vBulletin page, you don't need to run any queries...
PHP Code:
|
I knew this would be an easy solution !! Thanks !
|
All times are GMT. The time now is 10:04 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|