I don't think I am converting an array into a string and back again in the next script. This is simply because the value of my $lst_tbl variable is a value like "Resource id #2", which needs to be urlencoded to have something like "...auto_change.php?row_num=1&res_set=Resource%20id%20%232" in the URL.
The trouble with the key is, that I want this script to be applicable to any database table, regardless of its structure: whithout any knowledge about the primary key(s) of the table, I wanted to easily get back to the already selected data by using the row_num in the result_set. This way, I would have not to worry about multiple-colum primary keys, data changed by other users while goiing from one script to the next, etc.
Anyway, I can ever be sure to get the same row-order from the database when executing the same select twice, specially if other people are working on te DB simoultanousely.
Now, I'm afraid the only way to do the thing I want to do is only possible if I use a separate column in every table with some kind of row_id inside. This way, at least, I could be sure to get to the table-row I want to change, although this is not the way I'd like this to work. It is not really "pretty", and there is another query to run.
On the other hand, I could figure out a way to pass the values to a form and submit them for change, but this brings the trouble with the key right back.
I am really surprised that there seems to be no way to work in script 2 on a result-set created in script 1! When reading the PHP-documentation of mysql-functions, I thought I had found exactely what I was looking for when reading about mysql_pconnect:
"mysql_pconnect() acts very much like mysql_connect() with two major differences.
First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will
be returned instead of opening a new connection.
Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close
links established by mysql_pconnect()).
This type of links is therefore called 'persistent'. "
Either there is a serious misunderstanding of the documentation of mysql_pconnect, or there is something wrong about my connections.
Any help for solving my problem would be greatly appreciated. How do other people do this kind of job? I imagine, I am not the first to to this kind of thigs, am I?
Best regards,
Jean-Jacques