Sep 05 2008
Add table constraint: UNIQUE
To add a unique contraint for two table fileds, simply execute the following command:
ALTER TABLE scene_commands ADD UNIQUE (scene_id, command_id);
Sep 05 2008
To add a unique contraint for two table fileds, simply execute the following command:
ALTER TABLE scene_commands ADD UNIQUE (scene_id, command_id);
Aug 17 2007
Not very big script, but it can be helpful if you don’t remember how to write mysqldump
mysqldump -r /home/job/MyDump.sql mydatabase -u root -p
Apr 19 2007
$forbidden = array(’;',’DELETE’,'DO’,'INSERT’,'UPDATE’,'REPLACE’,'ALTER’,'CREATE’,'DROP’,'RENAME’,'DESCRIBE’,'USE’,'LOAD’);
$tmp_found = false;
foreach ($forbidden as $forbidden_word) {
if (stristr($_POST['request'],$forbidden_word)) $tmp_found = true;
}