PDA

View Full Version : what's wrong with this SQL query?


FlyingDutchman
09-15-2002, 11:22 AM
when i assign a query to a variable like this:

$originalfid=$DB_site->query("SELECT originalforumid FROM thread WHERE threadid='13'");

and echo the variable it's not working? i'm just getting nothing?
the originalforumid is a smallint(5) unsigned row... (it should say '7' for thread #13...)

i've also tried echoing like this: $originalfid[originalforumid], but it doesn't work too :(

and the strange thing is, that it just works normally when i run this query in phpMyAdmin:

SELECT originalforumid FROM thread WHERE threadid='13';

can anyone please help me with this...
thanks!

FlyingDutchman

Xenon
09-15-2002, 11:35 AM
replace query with query_first

and then use $originalfid[originalforumid]

FlyingDutchman
09-15-2002, 11:50 AM
wow, thanks for that very fast reply man!
works perfectly now :)
thanks!