24 Mar, 2007
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
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
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 […]