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

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements