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";

Did you know?Explore Trending and Topic pages for more stories like this.
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

PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php game
<

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the goin

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

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