MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Mon, Sep 26, 2016 10:51 pm

Displaying MySQL records with PHP

To query a MariaDB - MariaDB is a fork of MySQL - database using PHP, code similar to that shown below can be used. In this exmple, the account used to query the database is johndoe with a password of ThePassword. The database is named Acme and contains a table named Accounts.


$con = mysql_connect("localhost","johndoe","ThePassword");

if (!$con)
  die('Could not connect: ' . mysql_error());

mysql_select_db("Acme", $con);

$accounts = mysql_query("SELECT * FROM Accounts");


[ More Info ]

[/languages/php] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo