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

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

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