[thelist] php/mySQL again - getting single result from query?

Tom Dell'Aringa pixelmech at yahoo.com
Fri Jun 11 14:51:01 CDT 2004


(sorry about double post - it's friday, right?)

As you can see, I'm having my php/mySQL troubles today - I'm way too
rusty! I have a simple query that is going to produce a single
result, a number. I can't seem to remember how to pull it. I'm doing
this:

$queryD = "select sum(teamAID) as gp 
    from games where teamAID = '$teamID'"; 

$gamesResult = mysql_query($queryD);
$losses = $gamesResult["gamesPlayed"]; <-- I think this is wrong??

$losses doesn't hold any data... I'm not doing this right...

Tom

=====
http://www.Pixelmech.com/ - read my latest blog posting!
http://www.crossandthrone.com/ - Eternal Life

John 3:16





More information about the thelist mailing list