query based on 2 conditions


Posted on 16th Feb 2014 07:03 pm by admin

I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY username";

Also If I want to do two sorts can I do this:
Code: [Select] $query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY doc_type, username";
Thanks!

No comments posted yet

Your Answer:

Login to answer
92 Like 44 Dislike
Previous forums Next forums
Other forums

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Problem related to Creation of PDF File?
Hi All,
I am facing a problem related to creation pdf file. when I am creating a pdf file of do

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

Help with PHP Email Script
Hi guys,

I'm a newbie to php and need help with the script below:

At the moment when I

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tie

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash