|
![]() |
|
CMS takes the work out of building interactive websites. |
PHP MySQL
|
Contents Free PHP MySQL ToolsIntroduction to PHP MySQL Connecting to the Server Creating a Database Create a Table Adding Data Editing Table Data Delete Table Data Altering Tables Advanced Multiple Selection FormsCreate a Simple Poll |
|
The next line of code for interpretation uses a new mysql function:
mysql_num_rows(). This function simply returns the number of rows or records that have been added to the birthdays table. Notice that it accesses the information retrieved by the previous mysql_query stored as $result. The line following this syntax in the script prints the result to the screen. Embedded in the code that prints the results in table form we find another new mysql function. The mysql_fetch_row() function grabs an individual record or row from $result and divides it into the original fields. (id,name,birthday) $get_info = mysql_fetch_row($result)A foreach loop is used to print the fields in the cells of our table. foreach ($get_info as $field) This script can be used to return the rows of any table or database. Just replace the database name and table name with the appropriate information. The information display will resemble the table below the code.
<html>
|
Download the ScriptsThe Birthdays Database management files can be downloaded in a zip file. The package contains an integrated db management system, with a simple login file and interface. To run the scripts on your PC you must have a localhost server installed along with PHP and the MySQL server. MySQL TutorialTo extend your knowledge of MySQL study the Docs and Tutorials at the official MySQL website. MYSQL.com
|
|
|
|
|
|
| HTML TOC | Web Design | Create a Website | |
PHP MySQL - Interactive Website Design Copyright © 2007