As we know that CSV files are one of the most used way to back-up mysql database and tables. However it is very simple to export or backup your mysql database table as CSV file if you have PhpMyAdmin interface installed on your server. Actually problem arises when we have to deal with a shared…
Tag Archives: PHP
In this article we discuss about Swapping Array Keys and Values.
If you want interchange the keys and values of an associative array. It’s very easy, just use PHP’s array_flip() function which perform a very specialized task. It reverses the key-value relationship for all the elements of an asso…
Sometimes you want to alter the value of a node or an attribute in an xml document. You can read the XML file using PHP’s SimpleXML to assign new values to elements or attribute and save the changes back to the file.
$xml = simplexml_load_file(“data.xml”);
/* Aletr value of a node */
If you want Swapping Array Keys and Values. It’s very easy, just use PHP’s array_flip() function which perform a very specialized task. It reverses the key-value relationship for all the elements of an associative array and returning a new array that is the mirror image of the ori…
Php Interview Questions and Answers – Part 8
1- Give the syntax of REVOKE commands?
The generic syntax for revoke is as following
REVOKE [rights] on [database] FROM [username@hostname]
Now rights can be:
a) ALL privileges
b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.
As We know database holds one or multiple tables. Here in this post you will learn how create database tables in Mysql
Create a Database
We use the CREATE DATABASE statement to create a database in MySQL.
CREATE DATABASE database_name
To get PHP to execute the MYSQL statement we must use…