[PHP-DB] MySQL query question

2004-02-13 Thread js
i want to search the table called comments, and i want to count the number of times artid appears. then i want to group them all together, but then i want to order them by most appearances to fewest. so if artid 1 appeared 40 times and it was the most, i want that to be retrieved first. if

[PHP-DB] MySQL Query Question

2003-01-23 Thread Jeremy
Hello, I need some help from you MySQL gurus out there. This is pure SQL by the way..no front-end. Lets say you have a table that has 2columns.columnA, ColumnB and columnC I have something like this if (columnA'7', (columnB/columnC) + 52, columnB/ColumnC) as Number however i need to test

Re: [PHP-DB] MySQL Query Question

2003-01-23 Thread Frank Peavy
Jeremy, This question probably should be posted to the MySql mailing list but here goes. Take a look at this link: http://www.mysql.com/doc/en/Where_optimisations.html Your example was not very explicit so I am not sure, but I believe you are in need of a WHERE clause. For example; Select a,

Re: [PHP-DB] MySQL Query Question

2003-01-23 Thread Ignatius Reilly
] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 10:29 PM Subject: [PHP-DB] MySQL Query Question Hello, I need some help from you MySQL gurus out there. This is pure SQL by the way..no front-end. Lets say you have a table that has 2columns.columnA, ColumnB and columnC I have

RE: [PHP-DB] MySQL Query Question

2003-01-23 Thread John W. Holmes
I need some help from you MySQL gurus out there. This is pure SQL by the way..no front-end. Lets say you have a table that has 2columns.columnA, ColumnB and columnC I have something like this Oh CRAP! You lost me... you said two columns but listed 3! ;) if (columnA'7',