The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL Query Read
Hello. I am trying to make this script work, but for some reason it is not. I am trying to read from the DB to find a users customprofilepic filename. So far it's not working to well. Ideas?
Code:
$db->query_read("SELECT filename FROM " . TABLE_PREFIX . "customprofilepic WHERE userid='".$row[0]."'"); |
#2
|
||||
|
||||
Well firstly you dont need to quote numeric variables.
Secondly you dont tell us about the nature of the not working. Thirdly, and I will take a completely blind stab, are you using fetch_rows after the read_query? |
#3
|
|||
|
|||
Basically it is going to fetch the filename of a profile picture for a specific user. This filename is going to be displayed inside of an img source tag.
|
#4
|
||||
|
||||
Code:
$userid = (int) $row[0]; die($userid); // use this for a sanity check... $db->query_read(" SELECT filename FROM " . TABLE_PREFIX . "customprofilepic WHERE userid = $userid "); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|