Help

15 posts by 4 authors in: Forums > CMS Builder
Last Post: August 31, 2010   (RSS)

By Jason - August 31, 2010

Hi Craig,

Chris and I were going over this problem, and think we may have found it. Trying changing your code to this:

$sponsorList = trim($the_eventRecord['sponosors'],"\t");
$sponsorList = "('".str_replace("\t","','",mysql_escape($sponsorList))."')";

list($sponsorRecords,$sponsorMetaData)=getRecords(array(
'tableName' => 'sponsors',
'allowSearch' => false,
'where' => "title IN $sponsorList",
));


This will place single quotes around each of the items in your list and should get rid of that MySQL error.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Help

By KCMedia - August 31, 2010

Hi Jason

spot on mate perfect, just one more small thing in the sponsors area for each sponsor we put their website address i want to link the images on the event page tot he sponsors website that is set in the sponsors area.

how do i go about that have a look at the event file now how i did it but it dosnt work.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

the-event_003.php 9K

Re: [Jason] Help

By KCMedia - August 31, 2010

Hi Jason

oh yes now i understand how you have this working.

great thank you very much that just finished the site right now all good to go.

cheers

Craig
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

By gkornbluth - August 31, 2010 - edited: August 31, 2010

hi Jason, Chris and Craig,

Just curious, could you have used the Related Record Lookup Functions Plugin with a multi value pulldown list for this as well?

Nice to learn another way though.

Best,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php