NeverBored
07-04-2009, 10:54 PM
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.
global $db;
$ytvideo = $db->query_read("SELECT threadid FROM thread WHERE ytvideo = '$v'");
if($row = $db->fetch_array($ytvideo))
{
$ytvideoid = $row[threadid];
}
All I'm doing is finding the thread ID of the thread that has the matching column of $v in "ytvideo", if it exists, note that not all $v's have a matching thread - if that makes any difference...
global $db;
$ytvideo = $db->query_read("SELECT threadid FROM thread WHERE ytvideo = '$v'");
if($row = $db->fetch_array($ytvideo))
{
$ytvideoid = $row[threadid];
}
All I'm doing is finding the thread ID of the thread that has the matching column of $v in "ytvideo", if it exists, note that not all $v's have a matching thread - if that makes any difference...