mysql query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Consider a table similar to the one below.
What I want to do is to get ONE random record from categories(cat) A
and 5 random record from category B


| ID | computer | name | cat |... 1 dell 834 A 2 ibm 526 A 3 apple 134 B 4 sony 333 A 5 dell 834 B 6 ibm 556 A 7 apple 534 B 8 sony 233 A 9 dell 874 A ...


How could I construct my query to the mysql?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux