rudolfl Posted January 6, 2018 Share Posted January 6, 2018 Hi all, I am working on some enhancements and it appears that variable of $listing_sql used in /includes/modules/product_listing.php is saved between calls to the module. In my case index.php calls this module once, then it is called from a different pafe that doe snot have $listing_sql defined. Yet, as long as application_top.php" is included, variable is set. Any idea where is the code this variable is saved between page loads? Thanks, Rudolf Link to comment Share on other sites More sharing options...
rudolfl Posted January 6, 2018 Author Share Posted January 6, 2018 @wHiTeHat I think you misunderstood the question. It looks like $listing_sql gets saved between page loads on its own and i can not find what does it. My problem is that I do NOT want it to be saved! Rudolf Link to comment Share on other sites More sharing options...
♥kymation Posted January 6, 2018 Share Posted January 6, 2018 Are you setting $listing_sql as a session variable? That's about the only way it could persist. Try adding unset($listing_sql); after the last place you use the variable. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Solomono Posted January 6, 2018 Share Posted January 6, 2018 Rudolf, $listing_sql is set in index.php, and next file by default is products_listing.php, you have there $listing_split = new splitPageResults($listing_sql so, to have copy of this query, you should make something like $listing2 = $listing_split; before $listing_split = new splitPageResults($listing_sql and then you could make $listing_split2 = new splitPageResults($listing2 But you colud have another files including, if you have customized version of osc. Tell me pls example, what do you want to get from $listing_sql ? Link to comment Share on other sites More sharing options...
rudolfl Posted January 6, 2018 Author Share Posted January 6, 2018 1 hour ago, kymation said: Are you setting $listing_sql as a session variable? That's about the only way it could persist. Try adding unset($listing_sql); after the last place you use the variable. Regards Jim I am unsetting it myself in a way suggested, but was curious where it gets remembered I am not setting it myself anywhere. Looks like it is not being saved by osCommerce core, but one of the add-ons somewhere. And it is saved in session variable. Just hate leaving behind things I do not fully understand. Rudolf Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.