|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Why does this happen
I have a line of php / sql query that I have been trying to edit to display only the articles with a specific section number, Finally I have gotten the script to give me some results but it seems to be giving me the opposite of what I am looking for. When I call the script it gives me every section except the one indicated. php lines below
@$outcome=mysql_query("SELECT * FROM articles WHERE section='19'<='$sectionid' AND adate<='$date' ORDER BY adate DESC"); from what I was told the "section='19' should display all articles from section 19, but I get every article except the articles from section 19. Does anybody know why? Is there somthing wrong with the scipt/querry? (see also my post in the database section called "query / sort by problem, Absolut Engine", posted by me Aaron |
|
#2
|
|||
|
|||
|
RE: Why does this happen
I don't understand this:
<='$sectionid' try removing it. |
|
#3
|
|||
|
|||
|
RE: RE: Why does this happen
Quote:
I removed it, made it look like this @$outcome=mysql_query("SELECT * FROM articles WHERE section='19' ORDER BY adate DESC"); and it works! Thanks. If there are other huge obvious errors right in front of my face please let me know. Thanks |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Why does this happen |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|