Talk:Accessing the database using JDatabase
From Joomla! Documentation
Can anyone provide more info regarding insertObject()? I just have no idea of how to insert a row into a table. I tried to do the following but it just doesn't work:
$db = & JFactory::getDBO(); $query = "insert into #__my_table(field1, field2) values ('".$value1."','".$value2."')"; echo $query; $db->setQuery( $query ); return($db->Query());
Any ideas?
Thanks!