List:MySQL++« Previous MessageNext Message »
From:Denis 'SciFi' Simonet Date:March 14 2007 2:38pm
Subject:does 'AS' work?
View as plain text  
hi

i use the following query:
query2 << "SELECT show_data.id AS showid, show_data.player AS player, (2 
* player_gamedata.str * player_gamedata.tech) AS att, (2 * 
player_gamedata.dex * player_gamedata.qui) AS def, (15 * 
player_gamedata.con) AS hp, player_gamedata.finisher AS finisher, 
player_settings.image AS image, player.wname AS wname FROM (show_data, 
player, player_gamedata, player_settings) WHERE show_data.shownr = '"
                                << row["id"]
                                << "' AND player.id = show_data.player 
AND player_settings.player = show_data.player AND player_gamedata.player 
= show_data.player ORDER BY showid ASC";

But it then the use of row["showid"]throws an exception:
Error: Unknown field name: showid

The query itself is ok:
mysql> SELECT show_data.id AS showid, show_data.player AS player, (2 * 
player_gamedata.str * player_gamedata.tech) AS att, (2 * 
player_gamedata.dex * player_gamedata.qui) AS def, (15 * 
player_gamedata.con) AS hp, player_gamedata.finisher AS finisher, 
player_settings.image AS image, player.wname AS wname FROM (show_data, 
player, player_gamedata, player_settings) WHERE show_data.shownr = '1' 
AND player.id = show_data.player AND player_settings.player = 
show_data.player AND player_gamedata.player = show_data.player ORDER BY 
showid ASC;
+---------+--------+-------+------+-----+----------------------------------------------------+--------------------+----------------+
| showid  | player | att   | def  | hp  | 
finisher                                           | image              
| wname          |
+---------+--------+-------+------+-----+----------------------------------------------------+--------------------+----------------+
| 3901622 |  12102 |  1404 | 1352 |  90 | und geht mit OErni erstmal 
einen rauchen           | img/user/12102.jpg | PPlinky        |
| 3901623 |   1528 |  4608 | 3528 |  75 | mit der Hilfe von 
The-Game                         | img/user/1528.jpg  | BTSVsolider    |
| 3901624 |  12415 |    72 |  154 |  90 | via 3-count after a 
devastatingWhisper-in-the-Wind | img/user/12415.jpg | Archangelus    |
| 3901626 |  11088 |   612 |  578 | 255 |  mit dem Last 
Kick                                 | img/user/11088.jpg | ChrisFeader123 |
| 3901637 |   5040 | 10800 | 8450 |   0 |   via the Death Crew 
Rites                         | img/user/5040.jpg  | TheScorpion    |
| 3901640 |   8233 |  3526 | 3280 | 150 | via  westside F-U und danach 
der Westside STFU     | img/user/8233.jpg  | John cena12    |
| 3901644 |    267 |   722 |  432 | 195 |   weil LeoN ihm mit dem 
Chokeslam hilft            | img/user/267.jpg   | DeadKennedy    |
| 3901648 |    244 |  1620 | 1512 | 300 | durch alle Finisher der 
gesamten GCW-Stables!      | img/user/244.jpg   | Leo            |
| 3901651 |   1789 |  9940 | 8978 | 540 | Nachdem Er Ihn An Den Ohren 
Aus Den Ring Zieht     | img/user/1789.jpg  | BLACKPANTER    |
+---------+--------+-------+------+-----+----------------------------------------------------+--------------------+----------------+
9 rows in set (0.01 sec)

What's the problem now? Has MySQL++ got problems with AS? Should it at 
all work like this?
And if no, what field name does it take for the att for example?

thank you and best regards,
Denis 'SciFi' Simonet
Thread
does 'AS' work?Denis 'SciFi' Simonet14 Mar
  • Re: does 'AS' work?Warren Young15 Mar
RE: does 'AS' work?Ian Daysh15 Mar