![]() Topic awaiting preservation: Database fun (The second PHP thread in the hateful answers series) (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Juneau, Alaska |
![]() Once again, I was hesitant to ask this, but every tutorial I find falls just short of providing the information I need. |
Paranoid (IV) Inmate From: France |
![]() |
Nervous Wreck (II) Inmate From: Sydney, Australia |
![]() you could try the following: |
Nervous Wreck (II) Inmate From: Juneau, Alaska |
![]() Is there a php equivalent to orderby? Say I query like so: code: $Query = "Select * from $tablename";
|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() php->sort(), php->usort(), php->ksort() all could be used after you read your data into an array - but why can't you use order by?? |
Nervous Wreck (II) Inmate From: Sydney, Australia |
![]() to get the result of the query in the correct order, i think you just add the 'order by ???' to the end of your quewry like this: |
Nervous Wreck (II) Inmate From: Sydney, Australia |
![]() i think you can just add the 'order by ???' to the end of your query like this: |
Nervous Wreck (II) Inmate From: Sydney, Australia |
![]() sorry about the double entry i am having trouble with my isp dropping out tonight |
Nervous Wreck (II) Inmate From: Juneau, Alaska |
![]() code: $query = "select * from $tablename order by id desc";
code: while (($row = mysql_fetch_array($result))&&($facecount < 5)) {
|
Paranoid (IV) Inmate From: France |
![]()
|
Bipolar (III) Inmate From: Australia |
![]() yeh i have to do what youve done above for an access database, but sql has a limit clause you can use. Would be handy too |
Nervous Wreck (II) Inmate From: Juneau, Alaska |
![]() I wasn't aware of the limit clause. I'm new to programming altogether, and I've never used MySQL except for that orderby statement. Anyway, thanks for pointing that out |