Mysql useful queries

On July 11, 2009, in LAMP, Mysql, Tips, Tricks, by Sandeep Verma

Hits: 60  Age: Select DATE_FORMAT (NOW(), ‘%Y’) – DATE_FORMAT(BirthDate, ‘%Y’) – (DATE_FORMAT(NOW(), ’00-%m-%d’) < DATE_FORMAT(BirthDate, ’00-%m-%d’)) AS Age From tbl_member where 1; Change collation: Alter table `tbl_student` convert to character set utf8 collate utf8_swedish_ci; Shift mysql column: ALTER TABLE tableName MODIFY column column_2 int AFTER column_1; Get video info with user info: SELECT `video_id` , `video_title` [...]

Form’s array element in javascript

On July 11, 2009, in Javascript, LAMP, Tips, Tricks, by Sandeep Verma

Hits: 137  How to access form’s array element in javascript? Web Post Mobile Post Application Post Open Source Post Solution: <form action=”<?=$_SERVER['PHP_SELF']?>” method=”post”> <input name=”post[]” type=”checkbox” value=”web” /> Web Post <input name=”post[]” type=”checkbox” value=”mobile” /> Mobile Post <input name=”post[]” type=”checkbox” value=”application” />Application Post <input name=”post[]” type=”checkbox” value=”open” /> Open Source Post </form> <script type=”text/javascript”> for(i=0;i { [...]

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...