Re: [MySQL] Re: MySQL select matching
| From: | Ashley M. Kirchner | Date: | Mon, 19 Jul 2010 17:27:16 +0000 |
| Subject: | Re: [MySQL] Re: MySQL select matching | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307016@lists.php.net to get a copy of this message | ||
On 7/19/2010 10:48 AM, Michael Dykman wrote:
Not quite sure what the question is. from:mysql> select * from table where id='00001'; +-------+-----+-----+---+ | 00001 | 123 | 0.0 | C | | 00001 | 234 | 0.1 | D | | 00001 | 345 | 0.0 | D | | 00001 | 456 | 0.1 | C | | 00001 | 567 | 0.1 | G | +-------+-----+-----+---+How do we deduce that you would want ID '00003' ? This conversation would be easier if we gave names to those columns..
I didn't think it mattered, but the ID that I'm starting with (in this case '00001') is the user id currently searching the DB. Basically I take the user id and collect the initial data set I need to compare against.
As for names on the columns, ok:+-------+-----+-----+---+ | uid | set | dec | l | +-------+-----+-----+---+ | 00001 | 123 | 0.0 | C | | 00001 | 234 | 0.1 | D | | 00001 | 345 | 0.0 | D | | 00001 | 456 | 0.1 | C | | 00001 | 567 | 0.1 | G | +-------+-----+-----+---+