You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xata...@googlegroups.com, tew...@verizon.net
thanx, where do get the database unique error status? i assume
function myfield__validate(&$record, $value, &$params)
is called before the insert is attempted...
Steve Hannah
unread,
Jun 4, 2014, 4:21:46 PM6/4/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tom wible, xata...@googlegroups.com
You'll need to check the uniqueness using an SQL query inside your validate method. The database error is thrown by MySQL and it doesn't provide specifics as to which constraint was violated, just that it was a uniqueness constraint.
Steve
-- Steve Hannah
Web Lite Solutions Corp.
tom wible
unread,
Jun 6, 2014, 7:51:53 AM6/6/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Steve Hannah, xata...@googlegroups.com
Steve Hannah wrote:
> You'll need to check the uniqueness using an SQL query inside your validate
> method. The database error is thrown by MySQL and it doesn't provide specifics
> as to which constraint was violated, just that it was a uniqueness constraint.
thanx, steve, i'll go that way...just wondering: where is the sql error caught?
Steve Hannah
unread,
Jun 6, 2014, 12:25:19 PM6/6/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tom wible, xata...@googlegroups.com
The SQL error is caught when the SQL is executed in MySQL. Xataface attempts to run the INSERT statement, and when it receives the "DUPLICATE" error code, it propagates the error up. It actually occurs here