atsoumi Posted December 23, 2008 Share Posted December 23, 2008 Hello, I have a php page that takes some paremeters which I read through Get function. After that, I use these parameters to perfom some operations in an sql database(Insert, Select, delete). My database, currently has a simple table A with two fields key, data. I will create a second table B which will have as foreign key the primary key of table A. Through the php page I will add records to the table B. Now here comes my problem, I need to run an sql statement for the table B, but I have limitations regarding the display of the result so I cannot display all the records in once. I would like to save the select statement result and to use it after. What is the best way to do this? I read that through mysql I could have the output of the select query in a file. Is this the best method? Should I use a third table as a «buffer» and have the output of the select statement inserted in the new table? I should notice that I don't want to permantly store the result of the select statement, I actually need to temporarily store the result and pass it step by step to a mobile media. ??? Link to comment https://forums.phpfreaks.com/topic/138176-save-mysql-select-result-temporarily/ Share on other sites More sharing options...
redarrow Posted December 23, 2008 Share Posted December 23, 2008 Could use a temporary table http://www.tutorialspoint.com/mysql/mysql-temporary-tables.htm Link to comment https://forums.phpfreaks.com/topic/138176-save-mysql-select-result-temporarily/#findComment-722276 Share on other sites More sharing options...
atsoumi Posted December 23, 2008 Author Share Posted December 23, 2008 Could use a temporary table http://www.tutorialspoint.com/mysql/mysql-temporary-tables.htm Thank you for your answer but I dont think this will work for me. My problem is that when the select statement will be executed I dont want to show all the results right away. Let's say that my php page that will display the results will do this procedure by displaying each time 5 rows. So actually I need to display the results in diffrent sessions. Is the output to a file the only possible solution for me? Is a .txt file flexible for reading through php code? Link to comment https://forums.phpfreaks.com/topic/138176-save-mysql-select-result-temporarily/#findComment-722764 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.