
Jason
Staff
/ Moderator

Nov 15, 2011, 9:35 AM
Post #6 of 9
(683 views)
Shortcut
|
|
Re: [Toledoh] where not working?
[In reply to]
|
Can't Post
|
|
Hi Tim, My best guess is that the error is occurring in the query of the artist table. The only problem I can see is if there is no value for artist in $gig_eventRecords. That would mean that $artistNums would have no value, causing an error when used in the MySql IN statement. Try the code below to handle that event:
$artistNums = join(',', array_pluck($gigs_eventsRecords, 'artist')); if (!$artistNums) { $artistNums = "0"; } list($artistRecords,) = getRecords(array( 'tableName' => 'artist', 'where' => "num IN ($artistNums)", 'allowSearch' => false, )); If this happens, there will be no artist records returned, but it won't cause a MySQL error. Give that a try and let me know what you find. If that doesn't work, please do a "debugSql" on the artist query as well, so we can see what's happening there. Hope this helps --------------------------------------------------- Jason Sauchuk - Programmer interactivetools.com Hire me! Save time by getting our experts to help with your project. http://www.interactivetools.com/consulting/
|