A lot Information

There are everything from everywhere

MySQL Query Example Script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
// Connection
mysql_connect("localhost", "name", "pass") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
 
$result = mysql_query("SELECT name,age FROM users")
or die(mysql_error());  
 
$row = mysql_fetch_array( $result );
 
echo "Name: ".$row['name'];
echo " Age: ".$row['age'];
 
?>
<?php
// Connection
mysql_connect("localhost", "name", "pass") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

$result = mysql_query("SELECT name,age FROM users")
or die(mysql_error());  

$row = mysql_fetch_array( $result );

echo "Name: ".$row['name'];
echo " Age: ".$row['age'];

?>

,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">