Forums

View or Edit linkable fails with SQL error. CustomConnection

NickOg 08 Mar, 2015
Having a lot of trouble getting the view or edit linkable to function. I am using a custom view and the fields are defined as shown in Chono00.jpg.attached.

My HTML custom code is

<tr>
  <td class='njjoCenter'>{mdlListCourseReceipts.accountPaid}</td>
  <td class='njjoCenter njjoborderrightThick'><img src='components/com_u3a/common/img/print.png' /></td>
  <td class='tdidReceipt njjoCenter pad2 njjoborderright' >{mdlListCourseReceipts.idReceipt}</td>
  <td class='tdreceipttype njjoCenter pad2 njjoborderrightThick'>{mdlListCourseReceipts.enmReceiptType}</td>
  <td class='tddatePaid pad2 njjoCenter njjoborderright'>{mdlListCourseReceipts.localDateReceived}</td>
  <td class='tdname pad2 njjoborderrightThick'><?php echo $bookedBy;?></td>
  <td class='tdfeePaid njjoRight pad2 njjoborderright'>${mdlListCourseReceipts.feePaid}</td>
  <td class='tdpaidBy njjoCenter pad2 njjoborderright'><?php echo $paidBy; ?></td>
  <td class='tddatePaid pad2 njjoCenter njjoborderright'>{mdlListCourseReceipts.localDatePaid}</td>
  <td class='tdpayReceivedBy njjoCenter pad2 njjoborderrightThick'>{mdlListCourseReceipts.payReceivedBy}</td>
  <td class='njjoCenter'><img src='components/com_u3a/common/img/edit.png' /></td>
  <td class='njjoCenter'><img src='components/com_u3a/common/img/cancel.jpg' /></td>
</tr>
<tr>
  <?php 
  if (strlen($courseList['short'])>110){
    $scratchString=substr($courseList['short'],0,110).'……';
  } else {
    $scratchString=$courseList['short'];
  }
  ?>
  <td colspan='12' class='njjoTruncateTD' title='<?php echo $courseList['long']; ?>'>Booked for: <span class='njjoclsEmphasizeBox'><?php echo $memberBookedFor;?></span> <?php echo  $scratchString;?></td>
</tr>


My problem is that when i follow that link I get this error

1054 - Unknown column 'mdlListCourseReceipts. IS NULL' in 'where clause' SQL=SELECT `mdlListCourseReceipts`.`idReceipt` AS `mdlListCourseReceipts.idReceipt`, `mdlListCourseReceipts`.`accountPaid` AS `mdlListCourseReceipts.accountPaid`, `mdlListCourseReceipts`.`enmReceiptType` AS `mdlListCourseReceipts.enmReceiptType`, `mdlListCourseReceipts`.`feePaid` AS `mdlListCourseReceipts.feePaid`, `mdlListCourseReceipts`.`bookedBy` AS `mdlListCourseReceipts.bookedBy`, `mdlListCourseReceipts`.`paidBy` AS `mdlListCourseReceipts.paidBy`, `mdlListCourseReceipts`.`datePaid` AS `mdlListCourseReceipts.datePaid`, `mdlListCourseReceipts`.`dateReceived` AS `mdlListCourseReceipts.dateReceived`, `mdlListCourseReceipts`.`payReceivedBy` AS `mdlListCourseReceipts.payReceivedBy`, `mdlListCourseReceipts`.`localDatePaid` AS `mdlListCourseReceipts.localDatePaid`, `mdlListCourseReceipts`.`localDateReceived` AS `mdlListCourseReceipts.localDateReceived`, `mdlListCourseReceipts`.`pickDatePaid` AS `mdlListCourseReceipts.pickDatePaid`, `mdlListCourseReceipts`.`pickDateReceived` AS `mdlListCourseReceipts.pickDateReceived` FROM `hvu3a_u3a_vuCC_lisCourseReceipts` AS `mdlListCourseReceipts` WHERE `mdlListCourseReceipts`.` IS NULL



Just plain stuck! I could switch to a table option and see if that fixes it but that won;t really work as I need to access other related tables. I could no doubt get round it by writing my own links but that seems to be missing the value of CCC5

Any suggestions? I must be missing something.

Regards
Nick
GreyHead 09 Mar, 2015
Hi Nick,

The Help under the box says to use Model.field:Model.field as the syntax - you only have Model.field

Bob
NickOg 09 Mar, 2015
Hi Bob,
I see that it does and must check that out. I sort of assumed that the example was for two separate linkable fields.
Thanks
Nick
GreyHead 10 Mar, 2015
Hi Nick,

I've been caught like that - I think you need to follow the example even when it seems redundant.

Bob
NickOg 10 Mar, 2015
Hi Bob,

The problem is that, considering the Binary box - the example says

Multi line list of fields to be binary (0/1 values), e.g:Model.field:Model.field


However Max's example http://www.chronoengine.com/faqs/72-ccv5/5206-more-listing-settings.html shows a single field
Article.state



And I can't think what else one would put in that box to just toggle that single field. I can imagine one might toggle more than one field but that syntax is, as far as i read it
Article.state
Article.paid


Yours, puzzled of King Creek 🙂
This topic is locked and no more replies can be posted.