Categories > TinyButStrong general >

subqueries in sql (supported in tbs?)

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: powerpop
Date: 2004-05-17
Time: 22:09

subqueries in sql (supported in tbs?)

i have a query like the following:

SELECT wid, photourl  FROM nex_firsttable WHERE wid =
(SELECT wid FROM nex_othertable WHERE userid=5)

this is an allowable mysql 4.1 and above query but i am getting an error back from tbs saying it is invalid syntax - does tbs support subqueries??
By: Skrol29
Date: 2004-05-17
Time: 23:50

Re: subqueries in sql (supported in tbs?)

Hi,

TBS knows nothing of SQL. It simply passes the statement "as is" to MySQL.
I suggest you to test your query on a direct MySQL interface such as PhpMyAdmin.
By: RwD
Date: 2004-05-18
Time: 16:07

Re: subqueries in sql (supported in tbs?)

I was not aware MySQL supported subqueries...
I'll test at home...
By: powerpop
Date: 2004-05-18
Time: 19:08

Re: subqueries in sql (supported in tbs?)

aha - i need mysql 4.1 to make subqueries - and that is not in final release yet (just alpha) - so that is the problem - i will have to use joins instead to get the behavior i want :( - thank you for a great templating lib by the way!