scriptygoddess

Archive for the ‘mySQL’ Category

24 Mar, 2007

MySQL Cheatsheet

Posted by: Jennifer In: mySQL|PHP

Another mini-cheatsheet… I know this stuff, but I'm always looking it up for the exact syntax. Connect to MySQL and to the database – mysql_connect $connect = mysql_connect("localhost", "mysqluser", "userpassword") or die(mysql_error()); Select the database – mysql_select_db mysql_select_db("databasename", $connect) or die(mysql_error()); Close connection – mysql_close mysql_close($connect) or die(mysql_error()); Select data from the database – mysql_query [...]

27 Jun, 2004

Getting Dates in mySQL with MIN() and MAX()

Posted by: Jennifer In: mySQL

I'm working on a plugin that required getting the earliest date in the database, and also getting the oldest date in the database. I was hoping that there was a built-in function that did this – and there is. I found this helpful article on various mySQL techniques. And this is the one I was [...]

24 Jun, 2004

Reset autoincrement value in mysql tabl

Posted by: Jennifer In: mySQL

So tired of searching for this, (I know it's simple, but for some reason I can't seem to keep it in memory. LOL!) You just deleted all the rows in a table – but when you add new rows – they're still starting where the deleted ones left off. Run this sql query to reset [...]


Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements