Total 5 types of tables we can create
1. MyISAM
2. Heap
3. Merge
4. INNO DB
5. ISAM
MyISAM is the default storage engine as of MySQL 3.23. When you fire the above create query MySQL will create a MyISAM table.… Read more
how to create a table in mysql using php
If you want to create a table, you can run the CREATE TABLE statement as shown in the following :
$con=mysqli_connect(“example.com”,”user”,”pass”,”my_db”);
// Check connection
if (mysqli_connect_errno()) {
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}
// Create table
$sql=”CREATE TABLE users(FirstName CHAR(30),LastName CHAR(30),Age INT)”;
How do you pass a variable by value?
Just like in C++, put an ampersand in front of it, like $a = &$b… Read more
What is the functionality of the functions STRSTR() and STRISTR()?
string strstr ( string haystack, string needle ) returns part of haystack string from the first occurrence of needle to the end of haystack. This function is case-sensitive.
stristr() is idential to strstr() except that it is case insensitive.
<?php
$email = ‘name@example.com’;
$domain = strstr($email, ‘@’);
echo $domain;
What is the difference between ereg_replace() and eregi_replace()?
eregi_replace() function is identical to ereg_replace() except that it ignores case distinction when matching alphabetic characters. … Read more
How do I find out the number of parameters passed into function. ?
func_num_args() function returns the number of parameters passed in. … Read more
What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?
In MySQL, the default table type is MyISAM.
Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type.
The ‘.frm’ file stores the table definition.
The data file has a ‘.MYD’ … Read more
what are the different types of errors in php?
Here are three basic types of runtime errors in PHP:
1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script – for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all – … Read more
What is the difference between the functions unlink and unset?
unlink() is a function for file system handling. It will simply delete the file in context.
unset() is a function for variable management. It will make a variable undefined.… Read more
What is the difference between characters \023 and \x23?
The first one is octal 23, the second is hex 23… Read more