Programming

<?php

$option = array(); //prevent problems

$option['driver'] = 'mysql';
$option['host'] = 'localhost';
$option['user'] = 'username';
$option['password'] = 'password';
$option['database'] = 'database';


$db2 = & JDatabase::getInstance( $option );
$db2_query = $db2->getQuery(true);

$db2_query = $db2_query->select($db->quoteName(array('id', 'name', 'phone')));
$db2_query = $db2_query->from($db->quoteName('test'));
$db2_query = $db2_query->where($db->quoteName('id') . '=1');
$db2_query = $db2_query->order('id ASC');

$db2->setQuery($db2_query);

$db2_row = $db2->loadRow();
print_r($db2_row);
?>