469,111 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

Nested select

Happy friday to all. Those of you in Canada reading this message Happy
Thanksgiving weekend!!

I'm trying to display a bunch of checkboxes in php and have them
checked/not checked based on the results of the following query but
I'm getting syntax errors. This would work in mssql how would I
accomplish the same thing in mysql?

SELECT tblOrg_Type.ID, tblOrg_Type.Org_Type, (Select 'Checked' from
tblContactOrgType where OrgID = 8 AND tblOrg_Type.ID =
tblContactOrgType.OrgTypeID ) AS Checked
FROM tblOrg_Type;

Table Structures:

tblOrg_Type
ID
Org_Type

tblContactOrgType
ID
OrgID
OrgTypeID
Jul 19 '05 #1
0 1306

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Colman | last post: by
reply views Thread by Pascal Délisle | last post: by
1 post views Thread by Grigore Marinescu | last post: by
3 posts views Thread by Tcs | last post: by
2 posts views Thread by ask | last post: by
reply views Thread by santoshsri | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.