SQL Query

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 30, 2013   (RSS)

By Toledoh - July 26, 2013

Hi Guys,

How do I do a "OR" search? ie

SELECT s.num FROM `<?php echo $TABLE_PREFIX . nlb_subscriber_table() ?>` s
 WHERE s.`<?php echo nlb_subscriber_confirmedField() ?>` = 1
   AND (`membership_type` = '5')

OR (`membership_type` = '3')

Thanks!

Cheers,

Tim (toledoh.com.au)

By Toledoh - July 29, 2013

Perfect. Thanks.

Is there any resources where I can read up on this kind of thing?  Or even better, a list of common queries that would be used with CMSB?

Cheers,

Tim (toledoh.com.au)

By gregThomas - July 30, 2013

Hi Tim,

Unfortunately we don't have a resource for common MySQL functions. I'm not sure it would be possible as so many queries are completely unique, and they become complicated once you've gone outside of the basic where statement.

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com