Now its Insert, Update and Delete Query in Joomla,
For INSERT query in Joomla structure
$db = &JFactory::getDBO();
$insert_query = "INSERT into #__TABLENAME(feild1,feild2) values('value1','value2') ";
$db->setQuery( $insert_query );
$db->query();
For UPDATE query in Joomla structure
$update_query = "UPDATE #__TABLENAME SET feild1 = 'value1' ";
$db->setQuery( $update_query );
$db->query();
For DELETE query in Joomla structure
$delete_query = "DELETE FROM #__TABLENAME WHERE feild1 = 'value1' ";
$db->setQuery( $delete_query );
$db->query();
For INSERT query in Joomla structure
$db = &JFactory::getDBO();
$insert_query = "INSERT into #__TABLENAME(feild1,feild2) values('value1','value2') ";
$db->setQuery( $insert_query );
$db->query();
For UPDATE query in Joomla structure
$update_query = "UPDATE #__TABLENAME SET feild1 = 'value1' ";
$db->setQuery( $update_query );
$db->query();
For DELETE query in Joomla structure
$delete_query = "DELETE FROM #__TABLENAME WHERE feild1 = 'value1' ";
$db->setQuery( $delete_query );
$db->query();
PHP is an ever green web development programming language where it is the top preference for every developer. Thanks for your update on PHP language.
ReplyDeletePHP Course in Chennai
PHP Training Chennai