CALC - SQL pull a date from another table based on dB join

grossr

New Member
Almost embarrased to ask this as it's a noon question, but I am a noob :)
upload_2023-2-11_15-43-20.png

Trying to pull a date from "acquisitions" list into "flock_manager" list using a calc element. (so I can perform some date and other calculations. I'm sure it's a syntax issue. Any help will be appreciated.

From a calc element in the glock_manager table:

$mdate='{flock_manager___acquisition_lookup_raw}';
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery="SELECT hatch_date FROM acquisitions WHERE id = '$mdate'";
$myDb->setQuery($myQuery);
return $myDb;

I receive http 500 error on list when this element is published.
 

Attachments

  • upload_2023-2-11_15-42-32.png
    upload_2023-2-11_15-42-32.png
    9.2 KB · Views: 29
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top