ahughes3 Posted February 26, 2016 Report Posted February 26, 2016 Hi Guys, Because I run an alliance VA, we have multiple airlines, multiple routes etc. We are currently standing at 32k routes and it's basically sending my php memory limit into spasms! So my question or challenge is; would it be possible to create or modify a function within phpvms so that rather than the standard form trying to pull all routes to then search on (tell me if I'm wrong on this, just my understanding), I can use a form to purely select from DEP ICAO, ARR ICAO, Aircraft Type, Distance and it then make a query to the database to return only the results needed? This issue is having a knock-on effect for me with modules also that require routes to be booked and for some reason, their scripts seem to call all routes from the off. I am happy to try and have a go at modifying functions and dataclasses, but I could do with a bit of sign posting as to what needs to be altered. Thanks in advance. Quote
Members Vangelis Posted February 26, 2016 Members Report Posted February 26, 2016 You could alter the Query so you can use pagination have a look http://www.tutorialspoint.com/php/mysql_paging_php.htm Quote
ahughes3 Posted February 26, 2016 Author Report Posted February 26, 2016 Happy to have a go with that Vangelis. What query drives the schedule results? Or would I place the query directly into the schedule_searchform.php itself? phpvms.js schedulesData.class.php schedule_searchform.php schedules.php or something entirely different? Sorry, I know I'm clueless when it comes to php coding but always willing to give it a try. Quote
web541 Posted February 26, 2016 Report Posted February 26, 2016 Are you using the default schedules module (http://yoursite.com/index.php/schedules/view) or a different one? I have achieved dataTables pagination here , but I got most of the code somewhere on the forums (such as here) Quote
Members Vangelis Posted February 26, 2016 Members Report Posted February 26, 2016 Whel phpvms is an mvc framework that means that all query should go to schedules data.class At the moment I am away from a PC until Tuesday then I will be able to suggest some code Pagination work with limit and offset have a look here http://www.w3schools.com/php/php_mysql_select_limit.asp. So you should post like a form the offset in order to get let's say the next 50 records Quote
ahughes3 Posted February 26, 2016 Author Report Posted February 26, 2016 Ok I'll have a look at that thank you. Hopefully I can make some headway before I need to call on your expertise again . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.