Friday, October 5, 2012

MYSQL GRANT ALL PRIVILEGES


MYSQL GRANT ALL PRIVILEGES

GRANT ALL PRIVILEGES ON dbname.* TO 'user'@'localhost' IDENTIFIED BY 'password';

Wednesday, October 3, 2012

Tuesday, October 2, 2012

CodeIgniter echo sql statment

CodeIgniter echo sql statment

echo $this->model_name->connectionname->last_query();

Saturday, September 22, 2012

Classification Essay Tips

Division & Classification Essay Tips



Below are classification essay techniques to remember while making classification essay outline.

  • After extensive reading and gathering data, you must underline the important points and highlight them and sort out the things with same characteristics and name it as a separate group.
  • Start the classification essay with an interesting introduction and it should be quite straightforward in such a way that only the main division and classification essay idea or topic continues to be discussed. The introduction states the division and classification essay thesis statement of classification essay titles.
  • The developing paragraphs define each type of the category of the thing or place which is being classified in the classification and division essay topics. It is advisable to discuss only one category in one paragraph. You can also go from small to big category.
  • Provide a clear description of the category through relevant examples.
  • Conclusion is to summing up the essay's main points or providing a final view point about the topic.Conclusion leaves a final impact on reader's mind and it is written in three or four convincing sentences.

Tuesday, September 4, 2012

PHP multidimensional arrays with recursive function


in_array() does not work on multidimensional arrays. You could write a recursive function to do that for you:
function in_array_r($needle, $haystack, $strict = true) {
    foreach ($haystack as $item) {
        if (($strict ? $item === $needle : $item == $needle) ||  
(is_array($item) && in_array_r($needle, $item, $strict))) {
            return true;
        }
    }

    return false;
}

Usage:

$b = array(array("Mac", "NT"), array("Irix", "Linux"));
echo in_array_r("Irix", $b) ? 'found' : 'not found';

Monday, August 27, 2012

MYSQL- Restoring Your Database From Backup


 Using phpMyAdmin

phpMyAdmin is a program used to manipulate databases remotely through a web interface. A good hosting package will have this included. For information on backing up your WordPress database, see Backing Up Your Database.
Information here has been tested using phpMyAdmin 2.8.0.2 running on Unix.

Restore Process

A visual tutorial for phpMyAdmin 2.5.3 can be found at Podz' WordPress Restore guide.
  1. Login to phpMyAdmin.
  2. Click databases, and select the database that you will be importing your data into.
  3. You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
  4. Across the top of the screen will be a row of tabs. Click the Import tab.
  5. On the next screen will be a Location of Text File box, and next to that a button named Browse.
  6. Click Browse. Locate the backup file stored on your computer.
  7. Make sure the SQL radio button is checked.
  8. Click the Go button.
Now grab a coffee. This bit takes a while. Eventually you will see a success screen.
If you get an error message, your best bet is to post to the WordPress support forums to get help.

Using Mysql Commands

The restore process consists of unarchiving your archived database dump, and importing it into your Mysql database.
Assuming your backup is a .bz2 file, creating using instructions similar to those given for Backing up your database using Mysql commands, the following steps will guide you through restoring your database :
1. Unzip your .bz2 file:
user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2
Note: If your database backup was a .tar.gz called blog.bak.sql.tar.gz file, then, tar -zxvf blog.bak.sql.tar.gz is the command that should be used instead of the above.
2. Put the backed-up SQL back into MySQL:
user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
 -p databasename < blog.bak.sql

Enter password: (enter your mysql password)
user@linux~/files/blog:> 

Connect to MS SQLServer database in putty



Connect to MS SQLServer database in putty

isql -v 192.100.100.1/database username password