The mysqladmin tool can be used for changing MySql user’s password. The following line of code will change the user1′s …
My Articles:
Revoking MySQL Root Privilege
If we lost the root privilege or password, it can be retrieved by the following steps :
Stopping MySQL :
Shell Command
/etc/init.d/mysqld …
Copying value from one table to another
This can be done by using both insert and select queries.
Example :
Suppose we have two tables student and mark :
Student
id …
Creating a playlist for mplayer
We can create the mplayer playlist by following some simple commands :
$ find [/path/to/directory/] -name “*.mp3″ -print > myplaylist.txt
$ mplayer …
Add Ip’s to a Linux Server
1. Login to the server as root user.
2.
cd /etc/sysconfig/network-scripts
3. Check for existing network adapters with the command:
ls ifcfg-*
4. Copy …
Using wget command to download entire contents inside the directory
Using wget command, to download entire contents inside the directory.
This can be achieved by using the option -m with wget
for …
How to shutdown the server after sometimes
You just use the command “shutdown” with -h option to shutdown the server after some periods.
shutdown -h +period
for example:
shutdown -h …
Difference between htmlentities() and htmlspecialchars()
htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand. htmlentities translates all occurrences of …
Difference between echo, print and printf
echo is the most primitive of them, and just outputs the contents following the construct to the screen. print …
Magic Methods
PHP reserves all function names starting with __ as magical.
__sleep :- This function is executed …
Difference between include and require
It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and …
Changing fieldset tag line color
This can be done by using the style property of <fieldset> tag
Code Sample :
<fieldset style=”border-color: #ff0000;”>
MySQL Reconnect In PHP
Can use the inbuilt function mysql_ping(), which will check whether or not the connection to the server …
Autoloading Classes In PHP
Many developers writing object-oriented applications create one PHP source file per-class definition. One of the biggest …
