Sometime we need to add multiple classes in jQuery. We can achieve it very simply by using jQuery addClass() method.
Author » K K Agrawal
finding values in comma separated string using mysql
Generally, We give the various options of choices to choose on websites in form of checkbox and stores various values of choices in a column of MySQL database as a comma seperated . For example we store user’s preferred hobby in user table’s hobbies(varchar(250)) field(column). Value stored in this field may be like 1,2,5,6,1 or may be ‘sports’,’gardening’,’cooking’,’reading’.
last day of month in mysql
Sometimes we need to get the last day of the month on specific date in mysql becoz every month has different last day eg. FEB. may have 28 or 29, JAN has 31 and APR has 30.
disable fancybox after binding
I am having a strange issue, I have code that pulls content of wordpress posts that was using some plugin to bind fancybox to certain elements on the page. But now I want to implement that fancybox binding from some elements on that page.
Closing colorbox
Colorbox is a jQuery plugin, Nowadays jquery colorbox plugin is mostly used for displaying content in popup window. But there are still somethings where we stuck. Closing colorbox is one of them.
difference between cookie and session in PHP
Both cookies and sessions are available in any type of programming language like PHP, and both accomplish much the same task of storing data across pages on your site. However, there are differences between the two that will make each favourable in their own circumstance.
using PHP code into WordPress widget
Sometime we need to insert PHP code into Wordpress text widget but by default, Wordpress ignore PHP code into widget. People use plugin for getting this but we can achieve it by using below given code into theme’s function.php.
DAY in MySQL
DAY() in MySQL returns the day of the month for a specified date. The day returned will be within the range of 1 to 31. If the given date is ‘2013-03-13’, the function will return 13.
Most commented posts
In wordpress blog, wordpress provide the option to comment on the post and that would be posted on the blog after admin approval. Many of us will be using any number of plugins or the database query that’s been doing the rounds recently to display your most commented posts. But we can achieve it simply by using Wordpress’s query_posts or WP_query().
How to check a value exists in an array
How to check a value exists in an array is a general requirement when using array. We can do it by iterating through the array one by one and checking that the searched value exist or not. But now a days, everybody expects a short method means using built in functions in the language.