some help

5 posts by 3 authors in: Forums > CMS Builder
Last Post: May 25, 2011   (RSS)

By efi-revivo - May 24, 2011

Hello,

I have some question:

1. I have category field with pulldown (multi value)
I want to show on the record page only the first category.
how can i do it?

when i use this code:
<?php echo join(', ', getListValues('listing', 'category', $listingRecord['category'])); ?>

its show all the category like: 54, 14, 55
i need to see only the first one.


2. I have servel section with the same fields and I want to convert them to one section.
how can i copy all the records to one section?

Thanks,
Efi

Re: [efi-revivo] some help

By gkornbluth - May 24, 2011

Hi Efi,

Regarding item 2 - Have you looked into using Navicat, or the CSV import and export plugins?

regarding Item 1) have you tried implementing the 'limit' => '1',

(I have no idea if this would work for you, but it came to mind.)

Good luck,

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: [Jason] some help

By efi-revivo - May 25, 2011

thanks it's working.

about the plugin there is something free to do it?
maybe in the sql?

Re: [efi-revivo] some help

By Jason - May 25, 2011

Hi,

Yes, you could do it directly through sql if you're comfortable with that. We have a free MySQL consol plugin located here:
http://www.interactivetools.com/add-ons/detail.php?MySQL-Console-1011

Here is a MySQL manual page describing how to do this:
http://dev.mysql.com/doc/refman/5.1/en/insert-select.html

NOTE: you should only try this if you are comfortable using MySQL. You should ALWAYS make a complete backup of your database and files before attempting to execute sql commands directly on the database.

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/