PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mathieu Dumoulin   mysql_connection   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: mysql_connection
Wrapper for several MySQL connection information
Author: By
Last change: Did a typo while writting the new example file, i used the vb style method access "." instead of the c style method access "->".
Date: 20 years ago
Size: 575 bytes


Class file image Download

$mysql_server = new mysql_connection("localhost", "user", "pass", "mydb");
$result = $mysql_server->send_result_sql("SELECT * FROM thattable", 0);

//This checkup takes into account that there are no error column in the
//table queried.
//There was an error
Echo "An error occured<br>" . $result[error] . "<br>" . $result[sql];
//There are results
while($row = mysql_fetch_array($result)){
//Echo my data