Saturday, May 23, 2015

Check all check boxes javascript

<table>
<thead>
    <tr>
<th><input id="check_all" class="formcontrol" type="checkbox"/></th>
            </tr>
 </thead>
  <tbody>
<tr>
<td><input class="case" type="checkbox"/></td>
</tr>
  </tbody>
</table>

<script type="text/javaScript">
//to check all checkboxes
$(document).on('change','#check_all',function(){ $('input[class=case]:checkbox').prop("checked", $(this).is(':checked')); });
</script>

Wednesday, May 13, 2015

Incorrect integer value: '' for column 'id' at row 1

If  mysql code is ok ( example id column increment and not need to assign any value)  then try this

Edit the my.cnf (my.ini --- in windows file can be found in program file folder where mysql installed) file  and find and comment out the line:
#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Just remove "STRICT_TRANS_TABLES,"  and it looks like
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Not forget to restart mysql server.
This is the final solution for fixing this error.

Tuesday, May 12, 2015

Deny access to phpmyadmin remotely / control folder access via httpd.conf

Control any folder via httpd.conf which is a file under apache/conf  folder.

Restrict  phpmyadmin remote use and only use in localhost

<directory "c:/apache24/htdocs/phpmyadmin">
order deny,allow
deny from all
allow from 127.0.0.1
allow from ::1
</directory>

Total Pageviews