note 26738 added to function.mysql-result
| From: | fernando at unijui dot tche dot br | Date: | Mon, 11 Nov 2002 13:10:10 +0000 |
| Subject: | note 26738 added to function.mysql-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39295@lists.php.net to get a copy of this message | ||
Here is one simple sample about how to use the mysql_result:
<?php
// Define the conexion
$conexion = mysql_connect("hostname","user","pass");
// Test conexion
if ($conexion) {
// Select database
mysql_select_db("dbname");
// Query to run
$query = mysql_query("SELECT * FROM table_reference");
// Get result from query
$result = mysql_result($query, 0);
}
else {
echo("Conexion error:" . mysql_error() );
}
?>
--
http://www.php.net/manual/en/function.mysql-result.php
http://master.php.net/manage/user-notes.php?action=edit+26738
http://master.php.net/manage/user-notes.php?action=delete+26738
http://master.php.net/manage/user-notes.php?action=reject+26738