October 30

Difference between delete and truncate


  • DELETE is a DML Command.
  • DELETE statement is executed using a row lock, each row in the table is locked for deletion.
  • We can specify filters in where clause
  • It deletes specified data if where condition exists.
  • Delete activates a trigger because the operation are logged individually.
  • Slower than truncate because, it keeps logs.
  • Rollback is possible.


  • TRUNCATE is a DDL command.
  • TRUNCATE TABLE always locks the table and page but not each row.
  • Cannot use Where Condition.
  • It Removes all the data.
  • TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions.
  • Faster in performance wise, because it doesn’t keep any logs.
  • Rollback is not possible.
Category: MySal | LEAVE A COMMENT
October 19

SEO Tips for your website

If  you want to ranked top of search engines or in basic way, your site is visited by a larger number of people who use their browsers to search for related information.  Hence, website owners always strive to rank top in all search engines. To get this, all you try to use SEO (search engine optimization) techniques to optimize their sites. These should include catchy content, excellent web- design, an outstanding Joomla template and the use of properly related and targeted keywords in their sites.

Here are five basic tips for making your site SEO friendly-

1. Enable Search Engine Friendly URLs

2. Install a Good Sitemap and Submit to Webmaster Tools

3. Improve your Page Titles and Meta Descriptions

4. Use Good Alt Tags for Images, Optimize your Robots.txt File

5. Use Joomla SEO Plugin Extensions

October 11

Useful PHP Arrays


Array is one of the most important  part in every programming languages. PHP provides a very strong set of arrays.

Below is the list of arrays:

Numerical Array: 

$myarray = array();
$myarray[0] = “data 1”;
$myarray[1] = “data 2”;
$myarray[3] = “data 3”;

Continue reading

Category: Arrays | LEAVE A COMMENT
October 7

PHP Directory Functions


Using PHP we can do many operation with directories or folders. Upload, download, re-size, crop, open directory, read directory, close directory, read data and much more….

Some of the frequently used file system functions are as below;

  • chdir — Change directory
  • chroot — Change the root directory
  • closedir — Close directory handle
  • dir — Return an instance of the Directory class
  • getcwd — Gets the current working directory
  • opendir — Open directory handle
  • readdir — Read entry from directory handle
  • rewinddir — Rewind directory handle
  • scandir — List files and directories inside the specified path


1.  PHP Directory – chdir

The PHP chdir() function is used to change the control from the current working directory to the user specified directory. It returns TRUE on success otherwise PHP Warning  Continue reading

October 3

File handling in PHP

Kindly find the below, different  modes of files operations:




Read only. Starts at the beginning of the file


Read/Write. Starts at the beginning of the file


Write only. Opens and clears the contents of file; or creates a new file if it doesn’t exist


Read/Write. Opens and clears the contents of file; or creates a new file if it doesn’t exist


Append. Opens and writes to the end of the file or creates a new file if it doesn’t exist


Read/Append. Preserves file content by writing to the end of the file


Write only. Creates a new file. Returns FALSE and an error if file already exists


Read/Write. Creates a new file. Returns FALSE and an error if file already exists

Continue reading