I am listing here some mysql functions and their descriptions that you will be using during the courses and the example that we will cover later.
If you are interesting to know more function you can check
| Fonction | Description |
| mysql_close() | closes the non-persistent connection to the MySQL server |
| mysql_connect() | Open a connection to a MySQL Server |
| mysql_fetch_array() | Get a result row as an enumerated array |
| mysql_fetch_row() | Get a result row as an enumerated array |
| mysql_insert_id() | Get the ID generated from the previous INSERT operation |
| mysql_numrows() | Get number of rows in result |
| mysql_num_rows() | Get number of rows in result |
| mysql_query() | Send a MySQL query |
| mysql_select_db() | Select a MySQL database |
| mysql_fetch_object() | Fetch a result row as an object |
Other output functions:
Order by lets you choose an output order, giving you Asc output in ascending order, and Desc, the output will be in descending order.
Example of using an output order:
$req = mysql_query(“Select name1,email,date from test_tbl Order by id Asc“);
Will display the result from the record with the id 1 to the id 4, if you want the reverse you use Desc instead of Asc.
Limit allows you to limit the number of the query output lines, for example:
$req = mysql_query(“Select name1,email,date from test_tbl Limit 0, 20 “);
Select from the line 0 (the 1st recorded) and displays 20, you can select the 20 recording from any line, for example Limit 10, 20. and so on.
For the next lesson, you’ll find a complete example of coding a guesbook script, you will better understand how mysql and php work.
thnk u for the good tutorial