Plaguing Issue - with regards to multiple sections posting in viewers

8 posts by 4 authors in: Forums > CMS Builder
Last Post: March 22, 2010   (RSS)

Re: [equinox69] Plaguing Issue - with regards to multiple sections posting in viewers

By Dave - February 15, 2010

Hi equinox69,

I know what you mean. The short answer is that it doesn't do that right now, but we hope to automate some of those features in future.

We've added to code to inject values after the results have been loaded, but this method doesn't make those values searchable (as that needs to happen in MySQL).

Merging multiple tables and searching or returning their results requires something called "SQL Joins" and making these work automatically with all the possible fields people use is not something we've figured out yet.

We have some ideas, though, and plan on working on that more in the future. In part because we're writing custom code for those multi-table scenarios as well, and we'd prefer to have that automated for ourselves!

And because it's so complicated, I can't think of a simple tutorial. It really gets into learning SQL, which is a big topic. CMSB uses maybe 5% of the capabilities of SQL, but that's enough to handle 90% of most people's requirements.

So we're still writing custom code for those remaining special cases. But you can count on the fact that the more time we spend writing custom code for something, the more time we'll be spending thinking about how to automate it! :)

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Plaguing Issue - with regards to multiple sections posting in viewers

By Codee - February 15, 2010

Hmmm, okay, Dave. Maybe just my ignorance of the issues involved but it would seem to me that although making it work for all cases could be extremely complicated, that there could be a simple generalized join-type tool (for a specific set of section names and maybe a short relational tree) that could be adapted if the relationship group isn't compromised...at least for a short-term tool until something more complex is developed. Having the ability to have cross-sectional data and searching that data for at least a group or two is a fairly important tool for a CMS like this. Thanks for working on it.

Re: [equinox69] Plaguing Issue - with regards to multiple sections posting in viewers

By Dave - February 15, 2010

We're on it. As soon as we figure something out we'll post. (Actually it will probably go out on the beta list first).
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Plaguing Issue - with regards to multiple sections posting in viewers

By kitsguru - March 22, 2010 - edited: March 22, 2010

I have a similar but opposite problem, the solution to both might be the same or similar. I have different listing views but the same detail page. When the user wants to return to the list view, there is no current automatic mechanism to determine which list view they came from. Also I want the user to return to the same page they came from not the first page.

As for the complex SQL, why not add support for stored procedures in mysql 5+. As long as the server returns a result set, nothing really is different on the coding side to display records. For those of us familiar with SQL this would be a not brainer.[:P]

here is a php snippet to call a stored procedure
<?php

if ($result = mysqli_query($link, "call se_proc('crm')")) {



while( $row = mysqli_fetch_array($result) ){

echo ($row[0]. "--------- SR. " . $row[1] . "<br>");

}


mysqli_free_result($result);
}


?>
Jeff Shields

Re: [kitsguru] Plaguing Issue - with regards to multiple sections posting in viewers

By flamerz - March 22, 2010

Maybe you can use an option in the url, like this:

http://www.yourwebsite.com/detail.php?myitem&opc=buy <- here option is buy

http://www.yourwebsite.com/detail.php?myitem&opc=rent <- here option is rent

and you can generate a back link with that option.

i hope you can get it... tell us [:)]

another easy way is...

<a href="javascript:history.go(-1)">Go back</a>

Re: [flamerz] Plaguing Issue - with regards to multiple sections posting in viewers

By kitsguru - March 22, 2010

I can call my detail page ok with with your example. What I need to know is how do I replace:

<?php echo $listingsMetaData['_listPage']; ?>

with different _listpages as they are different.
example
buy.php?page=3 or rent.php?page=3
Jeff Shields

Re: [kitsguru] Plaguing Issue - with regards to multiple sections posting in viewers

By Dave - March 22, 2010

The _listPage field is just for convenience. For the more advanced setup that you have I would just skip it and create the return url yourself.

You could store the previous url in the current url or $_SESSION.

Or, if you want to keep using _listPage for consistency you could overwrite it's value at the top of the script based on what the previous page was.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com