|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Navigation Links and -SQL problemHello!
Wonder if anyone can help. I am in the process of changing a website from FileMaker to MySQL, and have changed an existing Inline to use - SQL rather than the standard Lasso parameters, as the search is a complex one: [Inline: -Database='Auctions', -Search, -SQL=$SQL, -MaxRecords= $Max_Records] That works fine, but now my navigation links to page through found sets of records are disabled. I see from the documentation that [Link_NextGroup] ... [/ Link_NextGroup] tags cannot be used where -SQL is specified in the inline. Does anyone know how I can go about setting up navigation links that work? Or are there any Lasso link tags which do work with -SQL? Many thanks in advance! Regards Marcus -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Navigation Links and -SQL problemCheck out this:
http://www.tagswap.net/results_navigation On Oct 23, 2009, at 8:06 AM, Marcus Holmes wrote: > Hello! > > Wonder if anyone can help. I am in the process of changing a website > from FileMaker to MySQL, and have changed an existing Inline to use - > SQL rather than the standard Lasso parameters, as the search is a > complex one: > > [Inline: -Database='Auctions', -Search, -SQL=$SQL, -MaxRecords= > $Max_Records] > > That works fine, but now my navigation links to page through found > sets of records are disabled. > > I see from the documentation that [Link_NextGroup] ... [/ > Link_NextGroup] tags cannot be used where -SQL is specified in the > inline. > > Does anyone know how I can go about setting up navigation links that > work? Or are there any Lasso link tags which do work with -SQL? > > Many thanks in advance! > > Regards > > Marcus > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > Brian Loomis http://www.virtualrelations.us (208) 639-2569 - 208 NEW BLOX -- email checked daily -- -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Navigation Links and -SQL problemHello
Brian - many thanks for your reply - but I ended up designing my own navigation from scratch which works well. Thanks! Marcus Code attached in case anyone is interested or wants to use it: At page header: [Variable: 'Skip_Records_Token' = (Token_Value: 'Skip_Records')] [Variable: 'Max_Records' = 50] [If: ($Skip_Records_Token) == 0] [Variable: 'Skip_Records' = 0] [Else] [Variable: 'Skip_Records' = ($Skip_Records_Token)] [/If] [Variable: 'Page' = (($Skip_Records / $Max_Records) + 1)] Inline: [Inline: -Database='DB', -Search, -SQL=$SQL, -MaxRecords= $Max_Records, -SkipRecords=$Skip_Records] [/Inline] At page footer: <!-- Navigation --> <!-- Set Skip Records for Previous Page --> [If: $Skip_Records > 0] [Variable: 'Prev_Skip' = (Math_Sub: $Skip_Records_Token, $Max_Records)] <a href="lot_listing.lasso?- Token .Action =[$Action]&Sales::ID=[$Sales_ID]&Search_Concat=[$Search_Concat]&- Token.Skip_Records=[$Prev_Skip]">< Previous Page</a> [/If] <!-- Page and Record Numbers --> Page [$Page] - Showing [Shown_First] to [Shown_Last] of [Found_Count] lots found <!-- Set Skip Records for Next Page --> [If: $Page < (Math_Ceil: ((Found_Count) / (Decimal: $Max_Records)))] [Variable: 'Next_Skip' = (Math_Add: $Skip_Records_Token, $Max_Records)] <a href="lot_listing.lasso?- Token .Action =[$Action]&Sales::ID=[$Sales_ID]&Search_Concat=[$Search_Concat]&- Token.Skip_Records=[$Next_Skip]">Next Page ></a> [/If] <br /> <!-- Navigate to specific pages --> [Variable: 'Count' = 0] Go to Page [While: $Count < (Found_Count)] <a href="lot_listing.lasso?- Token .Action =[$Action]&Sales::ID=[$Sales_ID]&Search_Concat=[$Search_Concat]&- Token.Skip_Records=[$Count]"> [If: (Loop_Count) == (Math_Ceil: (Shown_Last) / (Decimal: $Max_Records))]<FONT COLOR="#0000FF">[Loop_Count][Else][Loop_Count][/ If]</a> [Variable: 'Count' = $Count + ($Max_Records)] [/While] <!-- End --> On 23 Oct 2009, at 15:11, Brian Loomis wrote: > Check out this: > > http://www.tagswap.net/results_navigation > > > On Oct 23, 2009, at 8:06 AM, Marcus Holmes wrote: > >> Hello! >> >> Wonder if anyone can help. I am in the process of changing a >> website from FileMaker to MySQL, and have changed an existing >> Inline to use -SQL rather than the standard Lasso parameters, as >> the search is a complex one: >> >> [Inline: -Database='Auctions', -Search, -SQL=$SQL, -MaxRecords= >> $Max_Records] >> >> That works fine, but now my navigation links to page through found >> sets of records are disabled. >> >> I see from the documentation that [Link_NextGroup] ... [/ >> Link_NextGroup] tags cannot be used where -SQL is specified in the >> inline. >> >> Does anyone know how I can go about setting up navigation links >> that work? Or are there any Lasso link tags which do work with -SQL? >> >> Many thanks in advance! >> >> Regards >> >> Marcus >> >> -- >> This list is a free service of LassoSoft: http://www.LassoSoft.com/ >> Search the list archives: http://www.ListSearch.com/Lasso/Browse/ >> Manage your subscription: http://www.ListSearch.com/Lasso/ >> >> > > Brian Loomis > http://www.virtualrelations.us > (208) 639-2569 - 208 NEW BLOX > -- email checked daily -- > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Navigation Links and -SQL problemHi Marcus,
> I am in the process of changing a website from FileMaker to MySQL, and have changed an existing Inline to use - SQL rather than the standard Lasso parameters Unrelated to your specific question, but just a consideration when changing over to using SQL, is to ensure that you are using Encode_SQL on any search parameters derived from user input. The risks associated with SQL injection make navigation issues pale into insignificance. Very best regards, Rick -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
| Free embeddable forum powered by Nabble | Forum Help |