MySQL Tips & Tricks

Friday, January 30, 2009

Search for names of a certain length

Suppose if we want to find the names that contain exactly five characters, we use a special character "_"(underscore). The following query will list all the five letter names from the table employees.


select * from employees where firstname like '_____';

Labels:

Thursday, January 8, 2009

Creating Tables with CSS rather than HTML

Finally got to grips with this today, seemed pretty tricky but of course HTML tables can be troublesome as well. Nearly abandoned the attempt before I made a breakthrough and started to get a feel for it!

Also understood why this method is popular, it's because it cleans up your HTML instead of having zillions of tr, td tags you can black-box all the finetuning inside the stylesheet.

So should see some cleaner MySQL html templates from me now!

Labels: ,