|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Two Queries in One??
I am trying to write a php SELECT query that combines two queries. I tried using variations of UNION, but no success. Here is what I have. I read the PHP manual, but to no avail!
$query = mysql_query("SELECT * FROM $usertable WHERE $cycles LIKE '%$search%' AND DatePosted >='$revisedAcceptableDate' AND ClassifiedType='$ClassifiedType' UNION Paid >0 AND $classic LIKE '%$search%' AND ClassifiedType='$ClassifiedType' AND DatePosted >='$revisedAcceptableDate'"); Can someone give me the correct code? |
|
#2
|
|||
|
|||
|
RE: Two Queries in One??
What are you trying to accomplish>
|
|
#3
|
||||
|
||||
|
RE: Two Queries in One??
IMHO, this guy trying to access two table in the same time with some comparation. Please try to use LEFT JOIN.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Two Queries in One?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|