Quick MySQL Lookup

4 posts by 3 authors in: Forums > CMS Builder
Last Post: December 7, 2011   (RSS)

Re: [Perchpole] Quick MySQL Lookup

Hi Perch,

Don't have any idea if this will help. but I used it to limit the values returned.

You might be able to use the same approach and echo the $title

foreach ($master_subscription_pagesRecords as $record): ?>
<?php if ($record['createdByUserNum']== @$CURRENT_USER['num']): ?>

more code...

Just a thought...

Jerry Kornbluth
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

Re: [Perchpole] Quick MySQL Lookup

By Jason - December 7, 2011

Hi Perch,

If you're using CMS Builder version 2.08 or higher, you can use something like this:

Since you're using breadcrumb as an option, I'm assuming that this is pulling from a category section. Assuming that this section is named "categories" and the field in your record is called "category", you can get the corresponding record like this:

<?php
$category = mysql_get('categories', $record['category']);
echo $category['title'];
?>


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] Quick MySQL Lookup

Jason -

Perfect. Exactly what I was looking for.

:0)

Perch

PS. Thanks for chipping in Gerry.