Latest posts to the library
Categories: Microsoft, rant | 1 Comment

Everybody always raves how great Microsoft SQL Server is, and how much data it can hold, and how much bigger it’s “package” is than your own. But the truth is that I hate it with a passion! I use RDBMS‘ on a daily basis and never used to hate MSSQL so much until recently when [...]

MySQL Main Query Types SELECT SELECT * FROM tablename INSERT INSERT INTO tablename (col1, col2, col3,..) VALUES (val1, val2, val3,…) UPDATE UPDATE tablename SET `col1`=`val1`, `col2`=`val2`, `col3`=`val3`,… DELETE DELETE FROM tablename WHERE `col4`=`val6` Note You will use a lot of WHERE clauses as well along with the above. e.g. SELECT * FROM tablename WHERE `id`=’15′ [...]

Categories: mysql, php | Add a Comment

If you need to connect to a mysql database from php you can do it like this: <?php>    $DBH = ‘localhost’;    $DBU = ‘root’;    $DBPWD = ‘password’;    $DBN = ‘petstore’;    $conn = mysql_connect($DBH, $DBU, $DBPWD) or die  ("Error: Could not connect to database.");    mysql_select_db($dbname); ?> This allows you to [...]

Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource You have just gotten a warning when trying to check if an inserted row was successful but when calling mysql_affected_rows(mysql_query(“INSERT INTO……”)) you get a warning telling you that the supplied argument is not a valid MySQL-Link resource. This is because mysql_query INSERT actually returns true [...]

SELECT * FROM tablename WHERE `active`=’1′ AND `id` IN (’107′ , ’125′ ) ORDER BY `id` DESC LIMIT 12

I came across a very interesting article about mySQL Development Tools. http://www.smashingmagazine.com/2009/03/25/mysql-admin-and-development-tools-round-up/



back to top