Forums

Update database field

proso 27 Mar, 2013
Hi,

I'm trying to update my Joomla article. All my text for the article is available in the field 'volledig_artikel'.
I made a submit button, and when clicked, I have a custom code in the Onsucces:
<?php
$artikel = $form->data['volledig_artikel'];   
$db=& JFactory::getDBO();            
$query = "
  UPDATE
         FROM `jos_content`                   
        WHERE `fulltext` = '$artikel' 
";               
$db->setQuery($query);
$count = $db->loadResult();

?>


The code doesn't seems to work. Probably because it doesn't know which article to update? How can I fix this?
GreyHead 28 Mar, 2013
Hi proso,

That MySQL query is not good code at all :-(

This is possible but takes some knowledge of MySQL and of Joomla! You may be best getting help from someone who has that experience.

Bob
proso 30 Mar, 2013
Thanks Greyhead, I will do some mysql studies 😀
This topic is locked and no more replies can be posted.