471,073 Members | 1,318 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

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 1342

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by dw | last post: by
2 posts views Thread by Forgone Conclusion | last post: by
12 posts views Thread by Jeff Lanfield | last post: by
7 posts views Thread by Anthony Robinson | last post: by
3 posts views Thread by Tcs | last post: by
3 posts views Thread by Frank Swarbrick | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.