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!

92 Like 44 Dislike
Previous php-forum Next php-forum
Other php-forum

Reading Most Recent CSV File in Directory
I thought I had wrapped this project up, but found out that the program I use to FTP a csv file to m

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc

How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php


Thanks in advance

how to make database item unique
Hey guys,

is it possible to do this:

I have the database item $title being pulled for

How to add functionality to a simple php calender?
Hello everyone,

I have just finished creating a simple php calander. Can someone point

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

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