Select Data from MySQL
0 3907
Select Data from MySQL
'SELECT' statement is used to select the data from the table. If you want to select all the data from the table, then the
Syntax :
SELECT * FROM table_name;
And, if you want to select particular FIELD from the table, then the SYNTAX will be :
SELECT name FROM student;
After selecting a particular field like 'name' from the table like 'student', only that field will be selected.
Example :
<?php $sql="SELECT * FROM table_name"; // Now all data fetch from table, * is use for fetch all data from database $result= mysql_query($sql); $row= mysql_fetch_array($result); echo $row; ?>

Share:
Comments
Waiting for your comments