Jump to content

[SOLVED] ORDER BY


fesan

Recommended Posts

Hello....

 

I'm printing out some data from my database.

 

Is it possible to Order the outcome by two columns?

 

$query = "SELECT * FROM $dbtable WHERE type = 'Mac 300' ORDER BY type AND nr";

 

I tried out the code over but it didn't do what i hoped it would do.

 

How i want it:

Martin | 1

Martin | 2

Martin | 3

and so on...

 

This is how it comes out now:

Martin | 2

Martin | 1

Martin | 3

Link to comment
https://forums.phpfreaks.com/topic/140820-solved-order-by/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.