Posted by Akhenaten on 06/01/07 14:59
I must be missing something rather obvious. I have the following
snippet of code that echo's my result twice when it should be echoing
just once (only one element in the array). What am I overlooking?
********************************
$OpenQ = mysql_query("SELECT column FROM table WHERE q_uid =
$_SESSION[userid] AND status = 1",$db); // SQL query on DB returns 1
result
$Qresult = mysql_fetch_array($OpenQ); // Fetch the array
if ($_GET['OQ']) { // If the get variable is recieved
foreach ($Qresult as $Q) {
echo "<br>" . $Q;
}
}
*********************************
TY.
Navigation:
[Reply to this message]
|