Skip to main content

hks SQL php API

More
11 years 4 months ago - 11 years 4 months ago #201102 by lionel75
hks SQL php API was created by lionel75
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.x
-- Browser(s) name and version -- : many

Hi
I find in some hks forum post this php code : " hikashop_table('order') ".
I find that joomla wrap the SQL code in a joomla php API .
Q1 ) Is there place where i can find the hks joomla php API that wrap SQL code ? ( php code source name ? , official documentation ? ).

Joomla 3 "SQL " support :
- postgresql ( vaporware since all RDBMS server must follow SQL specification/compliance !!
- new function $db->execute() instead ->query()

it seem
1- MariaDB ll replace Mysql soon !!
2- php version must be upgrade


Thank's
Last edit: 11 years 4 months ago by lionel75.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #201107 by nicolas
Replied by nicolas on topic hks SQL php API
Hi,

HikaShop uses the standard SQL functions of Joomla.
hikashop_table is just a shortcut which is actually not that useful. You could just write #__hikashop_order and it would be the same.

MariaDB and MySQL are (almost) identical. HikaShop will work fine with it.
PHP is fine. ->execute is recommended but ->query will still work for a few years at least so nothing to worry about for now.
The following user(s) said Thank You: lionel75

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago - 11 years 4 months ago #201270 by lionel75
Replied by lionel75 on topic hks SQL php API
IT seem joomla use many shorcut so newby has problem to understand the code

1 predefine table name
#__ is the prefix of your table in your database
can be find in configuration.php line public $dbprefix =''

2 call table name
hikashop_table('order') in php for query call the table of name
#__hikashop_order


3 shorctut for call class
variable = JHtml::_(string.truncate) ?>
variable = JHtmlString ->truncate(); ?>

4 for class
/mylib/user.php will be equal to MylibUser

5 in template
$this->baseurl can be use instead of JURI::base( true )

Joomla use many alias shortcut seem an override of php with it own rules syntax !!!
I don't know if there a relation beetween those shortcurts and joomla/coding-standards
Last edit: 11 years 4 months ago by lionel75.

Please Log in or Create an account to join the conversation.

Time to create page: 0.232 seconds
Powered by Kunena Forum