Forums

CCv5 Plugin passed parameter SQL error on Delete

MainsailSoftware 22 Jan, 2015
I have the CCv5 working fine using the Plugin Passed Parameter for the retrieval and display. The condition used in the Model is as follows:

<?php
$cruise_id = \GCore\Libs\Request::data("cruise_id");
return array (":cruise.cruise_id = {$cruise_id}");
?>

In the Front List column list is as follows:

cruise.member_name:Member
cruise.vessel:Vessel
cruise.boat_name:Vessel Name
cruise.home_port:Home Port
cruise.reg_date:Registered
_DELETE_:Delete

The table displays correctly with the Delete link in the right most column.

When I click on a Delete link I get an SQL Error screen with the following description:

1064 - 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 '' at line 1 SQL=SELECT COUNT(*) AS `cruise.count` FROM `jos_chronoforms_CruiseAttendance` AS `cruise` WHERE cruise.cruise_id =

Evidently the condition specified for the Model is not being utilized by this internally generated SQL statement, or the value is not being found, or the amp;cruise_id issue needs to be addressed in another component.

If I use the browser's back arrow the table re-displays correctly and shows the message "1 Items Deleted".

Where do I look to figure out a fix for this issue?

Jim

PS... Can you provide instructions on how to insert an image so I can provide screen snippets... I am not familiar with this editor.
GreyHead 22 Jan, 2015
Hi Jim,

I can answer the image part of the question. You have to use the Blue 'Reply' icon at top or bottom left of the thread. That pens the full Reply editor which has an Upload file option. NB You must upload the file **before** submitting the post.

If you use the Quick reply that has reduced functionality and doesn't allow an upload. As an admin I can use it then re-edit my post to add an image file - but editing is disabled for non-admins. I think that is probably because there is a history of spammers making 'plausible' posts then later re-editing them to include promotional links :-(

Bob
MainsailSoftware 22 Jan, 2015
I think this may be the same or similar problem:

https://www.chronoengine.com/forums/posts/f12/t98508/how-can-i-insert-fields-that-are-based-on-complex-external-php-code.html
This topic is locked and no more replies can be posted.