The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
This query works and does exactly what I want, but it causes problems on my server with persistent connections, or something like that. When I take this out of my script my issues go away so I can only assume this is the problem. My host said something about having the query run then dropping the connection... I really don't know what that means or how to do it. My knowledge of this is pretty limited obviously, I wrote this query by looking through other files and piecing it together until I had something that did what I wanted.
Code:
global $db; $ytvideo = $db->query_read("SELECT threadid FROM thread WHERE ytvideo = '$v'"); if($row = $db->fetch_array($ytvideo)) { $ytvideoid = $row[threadid]; } |
#2
|
||||
|
||||
![]()
First off, you shouldn't have quotes around the $v because that implies it's a string and I'm pretty sure it's a number?
Is the result going to be just one threadid? If so use query_read_first (I think that's it - doing it from memory) and then leave out the whole next four line (the if with the parenthesis) and just say HTML Code:
$ytvideoid = $ytvideo[threadid]; |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|