Simple update statement in Joomla
A simple UPDATE statement in Joomla PHP code with the database object. It uses old Joomla 3 syntax; on Joomla 4 and newer, use the query builder.
Below you can find a simple update statement for PHP in Joomla!
$db =& JFactory::getDBO();$query = "UPDATE #__courseinfo SET courseQuota =". $quota." WHERE id=".$row- >courseCode ;echo"$query";$db->setQuery( $query );$db->query();
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.