Forums

DB Save blank page with conditions

tzn 11 Jan, 2015
I am trying to run a DB Save action but if I set a condition it displays a white empty page.

Here is my condition:
<?php
$user = JFactory::getUser();
return array('user_id' => $user->get('id'));
?>


My db table looks like this:
1	id	int(11) 
	2	uniq_id	varchar(50)
	3	user_id	int(11)
	4	created	datetime	
	5	modified	datetime
	6	amount	varchar(255)


On the form I have only the Amount textbox.

Any idea what is happening? If I put a debug action, the effect is the same, nothing displays.
GreyHead 14 Jan, 2015
Hi tzn,

Later: I was wrong, please ignore this post.

You have an extra ) at the end of this line
return array('user_id' => $user->get('id'));

Bob
BNDragon 15 Jan, 2015
Hi there,

@Bob, I don't think that's the problem, or I'm not see it, or he don't have the extra ).

@tzn, Your condition is for what? And you are return to where?

BN
This topic is locked and no more replies can be posted.