Closed Thread Icon

Topic awaiting preservation: SELECT * FROM tableA and then shows tableB (Huh?) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12267" title="Pages that link to Topic awaiting preservation: SELECT * FROM tableA and then shows tableB (Huh?) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: SELECT * FROM tableA and then shows tableB (Huh?) <span class="small">(Page 1 of 1)</span>\

 
Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 06-15-2002 10:56

$query_buscar = "SELECT * FROM juegos where player_1 = '" . $remote_userName . "' ";
$result_buscar = mysql_query($query_buscar) or die ("Could not query select");
if ($result_buscar) {
if ($row[0] <> ""){
echo "<table width=50% align=center><tr><td>Row 0 =".$row[0]."</td></tr></table>\n";
}
else {
echo "anything";
}

that is suppose to print the table 'juegos' right? well, it shows another table called posts!

The table 'juegos' has just two fields: player_1 and player_2 and the table posts has several fields more. (i don't think it's importat to name them, or it is?)

Anybody knows why?
I have another functions declared before, but none use the same variables than this one....

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-15-2002 11:09

You forgot to call mysql_fetch_array() function and therefore $row variable probably contains results from some previous query that you may have above that code...

$row = mysql_fetch_array ($result_buscar)) ;


Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 06-15-2002 11:13

Oh!! great!!
as usual, worked!

That problem would be avoided if I make a function in a separated sheet?
like placing all the functions in the same file, and then call that file and that function, better or not?


Thanks BTW, mr.maX!!!

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 06-16-2002 15:47

ahm, max, did i just see a new sig of yours?
with some foreign typografic?
the first could say Marko, but the rest?

Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 06-16-2002 17:11

Marko Nezic if I'm not wrong (i don't remember) is his last name...
Am I Wrong?

« BackwardsOnwards »

Show Forum Drop Down Menu