-
Pet Projects
Tag Archives: MySQL
Here is a quick tutorial: SELECT *, CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) AS myDateRegularized FROM myCoolTableName WHERE ShortName NOT IN (SELECT employee_shortName FROM employee) AND LENGTH(DateRegular) >= 1 AND ( CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) >= "2007-07-08" AND CONCAT(LEFT(DateRegular,4),"-",SUBSTRING(DateRegular,5,2),"-",RIGHT(DateRegular,2)) <= "2007-08-31" )
Here is a very simple tutorial to implement pagination using PHP and MySQL. Although this is not a fully working code, hopefully, the information provided here will be enough for most intermediate PHP programmers. $max = 10; $page = $_GET[’page’]; … Continue reading
That’s right, you heard me right: PHP6. Since PHP5 had very big improvements from PHP4, especially on the OOP side, I am already excited with the new stuff that will come with PHP6. And with this new addition (the mysqlnd … Continue reading
Posted this here for personal reference. (For MySQL 5.0) Useful links for this post: MySQL String Functions Using MySQL Triggers Creating a MySQL Trigger MySQL Triggers FAQ DELIMITER // CREATE TRIGGER mytest_trigger BEFORE INSERT ON mytest_table FOR EACH ROW … Continue reading
I found this on digg.com. As quoted from the source: “SQL Injection” is subset of the an unverified/unsanitized user input vulnerability (“buffer overflows” are a different subset), and the idea is to convince the application to run SQL code that … Continue reading