Update db

Oneeye_Viking 02 Oct, 2010
Hi I get this message when I try to update jos_users table.

Tableusers::store failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id='63'' at line 1 SQL=UPDATE `jos_users` SET WHERE id='63'

When I chage "Block user" from no to yes it is working fine, but when I change from yes to no I get the error above.

Any ideas?

Regards Erik
GreyHead 02 Oct, 2010
Hi Erik,

I'm not sure what code you are usign but there should be something between SET and WHERE like SET `block` = 1 WHERE . . .

Bob

PS It's generally not a good idea to write directly to the jos_users table but to use the Joomla! User Object instead.

Bob
Oneeye_Viking 02 Oct, 2010
Can you use the Joomla user object from the frontend?
Max_admin 03 Oct, 2010
Yes
$user = JFactory::getUser();
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.