The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
custom profile query
I need a query that matches info from an input box with a custom user profile and outputs that users id # and help or ideas? tanx.
|
#2
|
||||
|
||||
so basically like a search, you put in "knitting" and it'll come back with all the user id's that have knitting in that profile field?
can i see the attempted code thus far please? |
#3
|
|||
|
|||
$get_userid = $DB_site->query_first("SELECT " . TABLE_PREFIX . "userid FROM " . TABLE_PREFIX . "profilefield WHERE " . TABLE_PREFIX . "field19='$normalanswer1'");
$normalanswer1 comes from the input box. as you can tell this is the first time i've even looked at SQL. -Ted |
#4
|
||||
|
||||
Hey Ted, There's nothing wrong with your SQL there, it's your usage of the query_first function, which isn't appropriate in this instance. May I suggest taking a look at the list of resources stickied at the top of this forum if you wish to learn a little more about SQL.
|
#5
|
|||
|
|||
That's prob a good idea. thanks
i'm lost, sorry. maybe if i explain it better.... for example; I have a form that is gonna be filled out by the general public, the first input box is called "$normalanswer1". If this info matches one of my users custom field19 I would like the query to return that users id #. I hope this helps i'm in need of some serious help. $get_userid = $DB_site->query("SELECT userid FROM " . TABLE_PREFIX . "user WHERE " . TABLE_PREFIX . "field19='$normalanswer1'"); $user_id = $DB_site->query($get_userid); am i close? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|