Configuration

Easy SQL statement

Easy SQL statement

Run a MySQL statement or stored procedure from Joomla PHP code in four lines with the Factory database object. A short copy-and-paste example.

As simple as 4 rules of code you can do create a mySQL statment for database interactions.

Here we call a stored procedure with a variable ($jn_cache_data)

use Joomla\CMS\Factory; $setquery="call geo_v01_delete_old_records($jn_cache_data);"; $db = Factory::getDBO(); $db->setQuery($setquery); $db->execute();   Happy coding!
Stuck on something else?

Doctor Joomla is a project of Cloudfaction, a Dutch agency building and maintaining Joomla sites since 1999. The articles are made with the help of AI, so tell us if something does not match your screen. Mail info@cloudfaction.nl if you want someone to look at yours.

Rather have someone look at it

Doctor Joomla is a Cloudfaction project.

A Dutch agency that has been building and running Joomla sites since 1999. If your site needs more than an article can fix, get in touch.