#mysql - Tue 20 Feb 2007 between 00:01 and 00:21



iloveitalywhats the best way to keep your database's rowid numbered consecutively with no gaps when deleting entries?
chadmaynardwhy?
iloveitalyWell... I guess i dont have to. It would make the pagination I'm going to be doing a bit easier
chadmaynardi dont know of a way to do it on the fly without running a query to reorder it
you can paginate without consecutive id's easily
litheumiloveitaly: who cares if there are gaps?
iloveitaly: use LIMIT for pagination
chadmaynardor where
iloveitalyduh! Thanks for the help!
znationhi all
litheumznation: hi!!!
znationquestion: i just did a SELECT ... (multiple inner joins here) ... FOR UPDATE
how do i unlock whatever it locked?
litheumznation: end the transaciton
znationhow do i do that? :P
i'm kind of a n00b
litheumznation: if its a myisam table, or you are in AUTOCOMMIT, then nothing was locked :)
znationi think it's InnoDB
litheumwell first you should read about what ... FOR UPDATE *IS* before you start trying to use it!
you can roll the transaction back by just saying ROLLBACK
or you can commit by saying, as you should by now have guessed, COMMIT
znationoh, ok
litheumhowever if autocommit=1, nothing will have been affected by the ... FOR UPDATE clause
znationi see
i just did a COMMIT... let me see if that worked
litheumznation: http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html
znationthanks for the link
i did a COMMIT but my gallery2 site is still giving non-specific errors
litheumznation: well you need to figure out the specifics
apache error log file, maybe
znationi'm trying to log in as admin, maybe it will give me more specific errors that way... i don't think it puts anything into error_log
nope, nothing went in error_log
litheumznation: you checked the apache error log, not the mysql error log?
znation: there's nothing specific at all about the errors you're seeing from the site?
znationi checked the apache error_log, yes
nothing from gallery2
however, i logged into gallery2 as admin and got a stack trace
i'm checking what line of code did this so i can see the SQL statement
litheumridiculous that the SQL error is not shown in some sort of error capturing facility somewhere
znationyeah, this is weird... it looks like it may not even be an SQL error

Page: 2 9 16 23 30 37 44 51 58 65 

IrcArchive