| iloveitaly | whats the best way to keep your database's rowid numbered consecutively with no gaps when deleting entries? |
| chadmaynard | why? |
| iloveitaly | Well... I guess i dont have to. It would make the pagination I'm going to be doing a bit easier |
| chadmaynard | i 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 |
| litheum | iloveitaly: who cares if there are gaps? iloveitaly: use LIMIT for pagination |
| chadmaynard | or where |
| iloveitaly | duh! Thanks for the help! |
| znation | hi all |
| litheum | znation: hi!!! |
| znation | question: i just did a SELECT ... (multiple inner joins here) ... FOR UPDATE how do i unlock whatever it locked? |
| litheum | znation: end the transaciton |
| znation | how do i do that? :P i'm kind of a n00b |
| litheum | znation: if its a myisam table, or you are in AUTOCOMMIT, then nothing was locked :) |
| znation | i think it's InnoDB |
| litheum | well 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 |
| znation | oh, ok |
| litheum | however if autocommit=1, nothing will have been affected by the ... FOR UPDATE clause |
| znation | i see i just did a COMMIT... let me see if that worked |
| litheum | znation: http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html |
| znation | thanks for the link i did a COMMIT but my gallery2 site is still giving non-specific errors |
| litheum | znation: well you need to figure out the specifics apache error log file, maybe |
| znation | i'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 |
| litheum | znation: 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? |
| znation | i 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 |
| litheum | ridiculous that the SQL error is not shown in some sort of error capturing facility somewhere |
| znation | yeah, this is weird... it looks like it may not even be an SQL error |