Hi,
Actually I am trying to create some php form to extract data from database.
How should I connect to database?
I am trying :
$db = JFactory::getDbo();
$query = $db->getQuery(true);
but no result.
How can I access to jatc_university_j32 database and to its tables?
I tried even
[PHP]
$db_hostname = ‘localhost’;
$db_username = ‘root’;
$db_password = ”;
$db_database = ‘jatc_university_j32’;
// Database Connection String
$con = mysql_connect($db_hostname, $db_username, $db_password);
if (!$con) {
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db($db_database, $con);
[/PHP]
unsuccessfully