Hello,
This is a great extension. I can use it in several ways.
Now I'm in a sit when I just should do an UPDATE command, when I'm click on a text.
Is there any way to send an SQL command like '
UPDATE `nnd_user_go` SET `used`=NOT `used` WHERE `user_id`=<?php $user =& JFactory::getUser(); echo $user->id; ?>
' to the MySQL server?
Thanks!
This is a great extension. I can use it in several ways.
Now I'm in a sit when I just should do an UPDATE command, when I'm click on a text.
Is there any way to send an SQL command like '
UPDATE `nnd_user_go` SET `used`=NOT `used` WHERE `user_id`=<?php $user =& JFactory::getUser(); echo $user->id; ?>
' to the MySQL server?
Thanks!
Hi Heller,
You can use a Custom Code action
Bob
You can use a Custom Code action
<?php
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$query = "
UPDATE `nnd_user_go`
SET `used` = NOT `used`
WHERE `user_id` = {$user->id} ;
";
$db->setQuery($query);
$db->query();
?>Bob
This topic is locked and no more replies can be posted.
