|
Question about MySQL ...
hey guys .. this is a question for the database geeks and computer nerds who use MySQL .. it would be great if someone knows about JDBC and it's connections to MySQL ..
anyways, i was running into problems with the dumb database .. it wasn't taking aliases for tables when i was querying the tables .. such as :
"select a.att1, a.att2
from table a, table2 b";
typing the query at the prompt would give me no problems, but however, when i run it on the net, SQLExceptions get thrown like hell, and tell me that the database cannot find the table .a or .b .. i am like what the hell??? they are f'n aliases .. not the actual table names... hahhahahahahaha ...
i was thinking that it is the way i am creating my 'statements' to create resultSet queries ... this is how i am writing them ...
m_stmt = m_connect.getConnection().prepareStatement(sqlString, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE );
where m_stmt is declared as PreparedStatement, m_connect.getConnection() gets me a natural java.sql.Connection .. and the TYPE_SCROLL_SENSITIVE and CONCUR_UPDATABLE help me roll back my result sets when i am reading them .. that's pretty awesome .. can you roll resultSets back to the beginning in php ??? .. just wondering ..
but if anyone has any thoughts, and experiences where MySQL thinks the aliases are the actual table names, then speak out, or hold your peace .. hahhahahaa...
___________________
|