By: df
Date: 2009-07-16
Time: 23:47
|
MergeBlockI'm having trouble displaying the data in a multi-column display, serial block. There is an example for it using an array, but, I have the data in a MySQL database. I realize there is also an example for extracting from a MySQL DB, but, I can't seem to combine the two together. I want to use TBS to display my catagories, e.g.: http://www.dianfurniture.com/main/shop-furniture.php?ProductCatalogID=6.
I am using the following merge code: $TBS->MergeBlock('bx_1,bx_2,bx_3,',$cnx_id,'SELECT Variable1, Variable2 from MyDatabase WHERE ProductCatalogID = 6') ; I am using the sample template from serial block, just the first part, not the complex. But, I only get 1 row with all my data, it's not like the example with 3 columns and several rows. Can anyone help me out?!! Thanks. |
|
By: Skrol29
Date: 2009-07-17
Time: 01:16
|
Re: MergeBlockHi DF,
The serial mode works independently of the data source. It should be the same template for Array or for MySQL. I think the problem is in your template, can you post a snippet ? |
|
By: df
Date: 2009-07-17
Time: 04:05
|
Re: MergeBlockHi Skrol29,
Here is the template I used. This is copied from the samples on this website where is says "Display in columns (serial)". I used the first part and deleted the second table that relates to a complex display. ======
|
|
By: df
Date: 2009-07-17
Time: 04:10
|
Re: MergeBlock - ignore my last postingHi Skrol29,
Sorry, I posted the wrong version of the template. It's almost the same, but, in any case, this is what I am actually using:
|
|
By: df
Date: 2009-07-17
Time: 04:15
|
Re: MergeBlock - test resultsI forgot to mention, if you want to look at the results of my merge, this is the link:
http://test.dianfurniture.com/tbs/shop.php Thanks. |
|
By: TomH
Date: 2009-07-17
Time: 09:19
|
Re: MergeBlockThe PHP code doesn't compare to the example Try something like...
|
|
By: df
Date: 2009-07-17
Time: 12:36
|
Re: MergeBlockWhat??! I tried that at first, but, it didn't work! I probably changed too many items at once.
Thanks a lot! |
|
By: TomH
Date: 2009-07-17
Time: 21:02
|
Re: MergeBlockYou got it,
You're not the only one that drives down the road and bypasses the exit ramp because of doing too many things at the same time! But you correctly did two things many newcomers fail to do (1) you used the TBS examples as a benchmark to get at the basic functionality, and (2) you showed us your actual code So thanks for making it easy for others here to share their experience - and for others to be able to learn from it too. All the best, and come back for more, TomH |