I'm trying to access joomla's methods from a php file on the same server.
$shop_directory = '/var/www/components/com_shop';
$base_directory = '/var/www';
define( '_JEXEC', 1 );
define( 'JPATH_BASE', $base_directory);
define( 'JPATH_COMPONENT', $shop_directory);
define( 'DS', '/' );
require_once(JPATH_COMPONENT.DS.'helpers'.DS.'helpers.php');
require_once(JPATH_COMPONENT.DS.'helpers'.DS.'dbo.php');
require_once(JPATH_BASE.DS.'libraries'.DS.'joomla'.DS.'factory.php');
When i try to insert data on the database, nothing happens
$db = JFactory::getDbo('database_name');
$query = "INSERT INTO `payment_info` VALUES (
'',
'".$order_id."',
'".$customer_id."');";
$db->setQuery($query);
$db->query();
Thx
Try this,
Hope its works..