Archive

Archive for April, 2009

IE 8 CSS Hack

April 9th, 2009

In some cases, IE8 still can’t render CSS correctly. This is the magic trick to target only IE 8 .

.selector { property /*\**/: value\9 }

ex:
.myText { color /*\**/: #cc0000\9 }

CSS , ,

Modify Foreign Key

April 6th, 2009

To modify a Foreign Key in MySQL follow this steps :
1) Show table to see what is the name of Foreign Key we want to delete

SHOW CREATE TABLE table

2) Delete the Foreign Key

ALTER TABLE table DROP FOREIGN KEY table_ibfk_x

3) Create the new Foreign Key

ALTER TABLE table ADD CONSTRAINT `table_ibfk_x` FOREIGN KEY (`Field_id`) REFERENCES `references_table` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION

MySQL ,