Posts

Got a packet bigger than 'max_allowed_packet' bytes error in mysql?

Image
 Got a packet bigger than 'max_allowed_packet' bytes error in mysql? Open your my.ini and search max_allowed_packet   and change it to max_allowed_packet = 20 M

Uploadify with IE (Internet Explorer) destroy the session or reset the session in Codeigniter.

I was totally Fed up with this that why session destroyed every time when i upload a file in IE browser. I was using codeigniter and on a form i use uploadify, When i upload a photo and click on submit it take me on login page when i was login what is the problem with that. So Finally i solved this problem, Please take a look Open app/config/config.php In your config.php you can set your $config['sess_match_useragent']= FALSE;  When doing this CI 2.0 atleast, won’t create a new session for the flash object, and thus not kill your current session in IE.

How to checked all checkbox by on click on one checkbox via jquery?

How to checked all checkbox by on click on one checkbox via jquery? download jquery file from http://jquery.com/ and save into your folder. Note: Do not give online path of on your file otherwise this code will not work,  download jquery file form server and save it in your folder Now simple copy and paste this code in your file <script src="yourSiteUrl/js/jquery.min.js"></script> // Change this yourSiteUrl from your site url <script> function markall() { var AllDay = $("#select_all").is(":checked") ? "true" : "false";     if(AllDay=='true')     {         $('.clsNoborder').attr('checked',true);     } else {         $('.clsNoborder').attr('checked',false);     } }; </script> <div> <input type="checkbox" id="select_all" name="select_all" onclick="markall();"/>: check all </div> <div>  <input typ

How to check that date is today and yesterday in php?

How to check that date is today and yesterday in php? Use this function for get today and yesterday function get_day_name ( $ time ) { $date = date('d/m/Y', $time);             if($date == date('d/m/Y')) {             $time_since = 'Today';             } else if($date == date('d/m/Y',now() - (24 * 60 * 60))) {             $time_since = 'Yesterday';             }else             {             $time_since = 'Today';             } return $time_since; }        

Force Redirect http:// to https:// in codeigniter by .htaccess

Force Redirect http:// to https:// in codeigniter by .htaccess simply copy and paste this code in htaccess of root  to redirect http:// to https:// # Enforce SSL https://www. RewriteCond %{HTTPS} !=on RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Simple html css tooltip.

Simple html css tooltip. this is html css tooltip which is faster than jquery or javascript tooltip simple code and paste this code in file and hover on link <!-- css code --> <style>   .tooltip { border-bottom: 1px dotted #000000; color: #000000; outline: none; cursor: pointer; text-decoration: none; position: relative; } .tooltip span { position: absolute; display:none; } .tooltip:hover span { border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); font-family: Calibri, Tahoma, Geneva, sans-serif; position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; width: 250px; display:block; } .tooltip:hover img { border: 0; margin: -10px 0 0 -55px; float: left; position: absolute; display:block; } .toolt

Define DDL and DML in my mysql?

Define DDL, DML commands DDL Data Definition Language (DDL) statements are used to define the database structure or schema. examples are: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary RENAME - rename an object DML Data Manipulation Language (DML) statements are used for managing data within schema objects. examples are: SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates existing data within a table DELETE - deletes all records from a table, the space for the records remain MERGE - UPSERT operation (insert or update) CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency