Tuesday, 19 November 2013

Foreach equivalent in javascript


foreach function in PHP is very nice and easy to use,I am explain about equivalent function in javascritpt
<script language="javascript" type="text/javascript">
var new_array = new Array('knowledge','corner','srinu','chilukuri');
for (var key in new_array)
{     alert(new_array[key]); } </script>

Tuesday, 12 November 2013

How to use MySQLi_connect in PHP


As you all knows that MySQLi is improved PHP extension of MySQL which is introduced in PHP 5. MySQL is deprecated in PHP 5.5 will be removed in future. We have millions of applications using PHP MySQL and needs to be updated on MySQLi or PDO (PHP Data Objects is also a new extension you can use to use in your applications). So today i am going to give you a very simple integration guide of MySQLi how to connect to a database, how to run a query and insert records etc hope you like this article.


Thursday, 31 October 2013

How to Import CSV File Data Into Mysql Using PHP


How to Import CSV File Data Into Mysql If you are a developer then definitely you might have faced this. Many times you need to import data from a CSV (comma separated value) file and insert it into your MySQL database. Say for Example consider a case when you have many records in a CSV file and you need to import them into your MySQL database then you can’t insert each n every single record manually as it will take too much time.


Tuesday, 29 October 2013

Error: SQLSTATE[HY000]: General error: 1364 Field ‘xyz’ doesn’t have a default value


By default, MySQL is enabled with strict_mode ON, which will most likely cause problems with older PHP applications written for MySQL 4. For example, strict mode will return an error on insert statements if an empty string is provided where an integer is expected.
You may disable strict mode in one of two ways:

you can run the following in phpMyAdmin
SET @@global.sql_mode="";
or Open your “my.ini” file within the MySQL installation directory, and look for the text “sql-mode”. Find:
# Set the SQL mode to strict
 sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION”
and change to
# Set the SQL mode to strict
sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
********

Wednesday, 23 October 2013

Username Availability Checker With jQuery and Ajax


You might have seen many websites which checks username availability in real time during registration process.For example Gmail or twitter sign up processes, their registration process is user oriented , it tells user availability on run time.
This Article is to create a similar script which will tell username availability at run time.

In this article we are checking the username entered by the user during filling the form with the usernames already stored in the database using Ajax and Jquery on run time.



Read more >>

Monday, 21 October 2013


How to install adobe reader on ubuntu



This article help you to install adobe reader on Ubuntu
Adobe reader is a free and most trusted software to view PDF documents.it is the one of the essential software must installed in all kind of operating systems like linux , windows , MAC, tablets and mobiles

Read more >>

Thursday, 17 October 2013

Linux Chown Command Examples to Change Owner and Group


The concept of owner and groups for files is fundamental to Linux. Every file is associated with an owner and a group. You can use chown and chgrp commands to change the owner or the group of a particular file or directory.

In this article, we will discuss the ‘chown’ command as it covers most part of the ‘chgrp’ command also.

1. Change the owner of a file
$ls -l filename
-rw-r--r-- 1 srinu chilukuri 0 2013-10-16 20:03 filename

$ chown root filename

$ls -l filename
-rw-r--r-- 1 root chilukuri 0 2013-10-16 20:05 filename

So we see that the owner of the file was changed from ‘srinu’ to ‘root’.