Re: [MySQL] Re: MySQL select matching

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

 



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 |
+-------+-----+-----+---+




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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux