By: shashi
Date: 2010-10-21
Time: 09:22
|
pagination -- not workingHi,
Can someone post a complete script regarding mysql pagination. I am using ezsql since a few years now, and just yesterday found out TBS has its own TBSsql. Should I be using tbssql and not ezsql (I have no issues to port my scripts, as I see it will not involve a lot of rewrites). I searched this forum and also went to some links ..some have posted just parts of scripts, but now how they are initializing the db, and some are just displaying the core feature, but not the header part or the includes. If anyone has done TBS with mysql pagination, using ezsql/equivalent, please do post a simple complete php and html page please. Thanks, Shashi |
|
By: Shashi Dahal
Date: 2010-10-21
Time: 09:27
|
Re: pagination -- not workingHi,
In case I have missed any post here, which already shows this info, please point me to that post. Thanks again, Shashi |
|
By: Skrol29
Date: 2010-10-21
Time: 10:32
|
Re: pagination -- not workingHi Shashi,
There is no requirement about your database connectivity tool. TBS has a database plug-in for ezSQL (see the Plug-in page) if you prefer ezSQL. TbsSQL is published here because TBS recognizes TbsSQL in native, it is the same author and development team. Of course, I personally think that TbsSQL is better than ezSQL. |
|
By: Skrol29
Date: 2010-10-21
Time: 10:38
|
Re: pagination -- not workingabout MySQL pagination: whatever database your are connected with, TBS does not chnage the SQL you've given to MergeBlock().
So if you need a pagination, you have to manage it in the SQL statement or use the ByPage plug-in. |
|
By: shashi
Date: 2010-10-21
Time: 10:43
|
Re: pagination -- not workingHi,
I read and I feel I will also migrate to TbsSQL. However, I have not been able to find a good documentation. In the documentation, there is a data --> mysql section, but it loads from cnx_mysql.php so In case of TbsSQL, we need to include this file, and then run the statement, get the array, and then can load it in the merge, and if want to do a direct query in the merge section, define $db in place of cnx_id ? Also a simple complete example using TbsSQL and navbar plugin will be highly appretiated. Cheers, Shashi |
|
By: shashi
Date: 2010-10-21
Time: 10:46
|
Re: pagination -- not workingHi,
I am looking for an example for this: http://tomhenry.us/tbs3/navbar_foundrows/ That site has an working example of the script also: http://tomhenry.us/tbs3/navbar_foundrows/show_companies.php .. but unlike other solutions, there is no source or complete download package for this. Thanks, Shashi |
|
By: Skrol29
Date: 2010-10-21
Time: 11:13
|
Re: pagination -- not working> if want to do a direct query in the merge section, define $db in place of cnx_id ?
It is explained in the TbsSQL documentation: http://www.tinybutstrong.com/tbssql.php#tbs Just make your connection with TbSQL and then use $Db->TbsKey as the source id for MergeBlock(); Example
For more complicated merges, you can get the result in an array using $Db->GetRows(...) and then merge them with MergeBlock(). |
|
By: Shashi
Date: 2010-10-21
Time: 16:44
|
Re: pagination -- not working:)
Now working. Thanks. |
|
By: shashi
Date: 2010-10-22
Time: 04:45
|
Re: pagination -- not workingThank You Skrol29
/me passes Skrol29 a giant pizza :) |