Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Passing sql results through files.

gustavosserragustavosserra Posts: 201Member
Hi everyone!
Ill try to explain my problem as best I can. I have, for instance, two php files. The first show a list of possible choices, from a sql statement. This file also has the information that the second file needs to show. The second file just show details for the given option. I need to pass the details from the first file to the second. I cant store the information in an array because there are many options with lots of information, and each one is shown as a link to the second file in the html generated. I tryied to store the sql result (from mysql_query), but it is lost in the second file, using $_SESSION...

Can anyone help? If my problem needs better explanation, please let me know.
Thanks any help.

Comments

  • netgertnetgert Posts: 331Member
    : Hi everyone!
    : Ill try to explain my problem as best I can. I have, for instance, two php files. The first show a list of possible choices, from a sql statement. This file also has the information that the second file needs to show. The second file just show details for the given option. I need to pass the details from the first file to the second. I cant store the information in an array because there are many options with lots of information, and each one is shown as a link to the second file in the html generated. I tryied to store the sql result (from mysql_query), but it is lost in the second file, using $_SESSION...
    :
    : Can anyone help? If my problem needs better explanation, please let me know.
    : Thanks any help.
    :
    are you using persistent connection? it is certain that on non-persistent connections the results are freed, maybe it is still valid with persistent connection
    are you calling session_start() before any attempt to use $_SESSION ?
    these are some things to look over
    then, maybe there is a way to pass only a little information to the 2nd page (using session) from which u can query the detailed information
    [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]

  • gustavosserragustavosserra Posts: 201Member
    : : Hi everyone!
    : : Ill try to explain my problem as best I can. I have, for instance, two php files. The first show a list of possible choices, from a sql statement. This file also has the information that the second file needs to show. The second file just show details for the given option. I need to pass the details from the first file to the second. I cant store the information in an array because there are many options with lots of information, and each one is shown as a link to the second file in the html generated. I tryied to store the sql result (from mysql_query), but it is lost in the second file, using $_SESSION...
    : :
    : : Can anyone help? If my problem needs better explanation, please let me know.
    : : Thanks any help.
    : :
    : are you using persistent connection? it is certain that on non-persistent connections the results are freed, maybe it is still valid with persistent connection
    : are you calling session_start() before any attempt to use $_SESSION ?
    : these are some things to look over
    : then, maybe there is a way to pass only a little information to the 2nd page (using session) from which u can query the detailed information
    : [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]

    I realized that I will have my entire buffer in memory, since SQL will store the result of my query. So it isnt so bad if I use an array to store the results. Thanks for your help NetGert, I reviewd your suggestions and everthing is ok! But I have one more doubt. I tryied to use argv global variable to receive a parameter in the URL. But I cant recover the value, seems like argv is not defined. Any clue?
    As always, thanks any help.
  • gustavosserragustavosserra Posts: 201Member
    [b][red]This message was edited by gustavosserra at 2004-8-21 11:54:16[/red][/b][hr]
    : I realized that I will have my entire buffer in memory, since SQL will store the result of my query. So it isnt so bad if I use an array to store the results. Thanks for your help NetGert, I reviewd your suggestions and everthing is ok! But I have one more doubt. I tryied to use argv global variable to receive a parameter in the URL. But I cant recover the value, seems like argv is not defined. Any clue?
    : As always, thanks any help.

    HTTP_GET_VARS, I figured out!


Sign In or Register to comment.