Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Share your PHP Pages Code (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Share your PHP Pages Code
#27
admin (Admin)
Admin
Posts: 230
graph
User Online Now Click here to see the profile of this user
Share your PHP Pages Code 6 Months ago Karma: 5  
If you have written some custom code for the PHP Pages Component and would like to share it, post it here:
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#85
admin (Admin)
Admin
Posts: 230
graph
User Online Now Click here to see the profile of this user
Re:Share your PHP Pages Code 5 Months, 2 Weeks ago Karma: 5  
Here is how to connect to a database other then the Joomla database using the Joomla 1.5 API.

$options = array();
$options['driver']   = 'mysql'; // or mysqli
$options['host']     = 'localhost';
$options['user']     = 'j10';
$options['password'] = 'j10';
$options['database'] = 'j10';
$otherdb = JDatabase::getInstance($options);

$otherdb->setQuery('SELECT * FROM jos_users');
$rows = $otherdb->loadObjectList();

print_r($rows);
The $option values are dependent on your database settings.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/07/26 08:15 By admin.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop