Thread Nächste id (7 answers)
Opened by Froschpopo at 2007-05-10 11:43

pq
 2007-05-10 12:44
#35462 #35462
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=Froschpopo,10.05.2007, 09:43]wie bekomme ich nun die nächste ID (auto_increment, Primary Key) deren name ebenfalls gleich 'peter' ist.[/quote]
[sql]SELECT id, name FROM users WHERE name = 'peter' AND id > letzte_id limit 1[/sql]
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Nächste id