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

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past

pls clear my confusion
Hi friends,

Pls solve my query .

what is the exact use of Scope Resolution Operator( i

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