oceans Posted May 3, 2007 Share Posted May 3, 2007 Dear People, Please advice: When I make a view table in mysql for as pre request from a client, does this table belongs to the this client only or all the clients who uses the server. My intension, i want to create exclusive "temp" tables for clients, where no other clients will be able to go into it. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/ Share on other sites More sharing options...
Barand Posted May 3, 2007 Share Posted May 3, 2007 A temporary table belongs to the mysql connection where it was created. So if you create a temp table in your script it is dropped at the end of the script when the connection is closed. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244160 Share on other sites More sharing options...
oceans Posted May 3, 2007 Author Share Posted May 3, 2007 Thanks Banard, This leeds to another question, Say two clients are coming in, am i right to say the slightly first client gets his scripts done first, the second waits till the first is over the the second gets his work, this way the table will die after the first script is over Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244163 Share on other sites More sharing options...
Barand Posted May 3, 2007 Share Posted May 3, 2007 Each client gets their own version of the temp table as they each have their own connection Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244168 Share on other sites More sharing options...
oceans Posted May 3, 2007 Author Share Posted May 3, 2007 I have been doing SOCK programming, when I did in VC and VB, I will take care of FIFO server access, I also make sure only one client gets his access at any moment and the rest will Q for their turn, and will of course get their access eventually. I want to know if PHP MySQL interaction is also same as above by default. That is, though there may be n number of client script run request, only one script should be processed per time, that is no multi threading. Windows does multi thread, thus I will force it not to, thus if PHP MySQL interaction is multi thread like, how can I force it. Well nothing seriously will get wrong in my application, just worried about my view tables, one opens it and the rest sees it. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244171 Share on other sites More sharing options...
Barand Posted May 3, 2007 Share Posted May 3, 2007 My connection sees my temp tables, your connection sees yours. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244179 Share on other sites More sharing options...
oceans Posted May 3, 2007 Author Share Posted May 3, 2007 No, I tested, It DOES NOT appear exclusive! I have two independent pages with different name, in one i create a view then list the view, i have not dropped it yet, i ran my second page call for the view i still can list my view. If you said it is exclusive the second page should not have returned a result. Members, please help me, this is very importent to me, i have to take a one way route based on this. I am creating any responsibility here. But in any care create a view is far simple way for me to so microscoped search. please guide me, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244268 Share on other sites More sharing options...
Barand Posted May 3, 2007 Share Posted May 3, 2007 Did you CREATE TABLE ... or CREATE TEMPORARY TABLE ... ? Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244285 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 CREATE VIEW `table` AS SELECT * FROM `ST` WHERE 1 Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-244978 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 Any one can help Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245033 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 I am keeping this on top so that some one will help Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245141 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 hope this will not die off please advice Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245205 Share on other sites More sharing options...
Barand Posted May 4, 2007 Share Posted May 4, 2007 Did you try CREATE TEMPORARY TABLE ... Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245210 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 please specify command i used CREATE VIEW `table` AS SELECT * FROM `ST` WHERE 1 also is it user specific? page one creates this table and page 4 looks at this table Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245211 Share on other sites More sharing options...
Barand Posted May 4, 2007 Share Posted May 4, 2007 CREATE TEMPORARY TABLE `table` SELECT * FROM `ST` Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245212 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 I am tired, got to go, i will try after some break, my eyes are red!!! but let me comfirm before going. my intention, as usual i will have n number of clients. as usual clients will walk from page to page carrying along sessions variables. for a client i will create this table in page 1 and will only use this table in page 3. mean while if another client comes to the page 1 or 3 he will have his own table and will not use the earlier client's table. please confirm my understanding, thanks. honest i prefer temp tables (view), if not i can't imagine creating so many if else combinations. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245219 Share on other sites More sharing options...
oceans Posted May 4, 2007 Author Share Posted May 4, 2007 Dear Barand, please comment, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245229 Share on other sites More sharing options...
Barand Posted May 4, 2007 Share Posted May 4, 2007 Give me a chance, I am not working on your time! I've been led astray already because you started talking about TEMPORARY tables but you've now introduced a new scenario of wanting the table several pages later. I'm doing <b>your</b> research for you at mysql.com seeing what it says about VIEWS and what your options are. Correction - I was. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-245235 Share on other sites More sharing options...
oceans Posted May 6, 2007 Author Share Posted May 6, 2007 Thanks Barnad, I am keeping this thread alive! Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-246480 Share on other sites More sharing options...
oceans Posted May 7, 2007 Author Share Posted May 7, 2007 Dear Barnad, I tried to read up, but it seems it temp table or view will not work for me, do you agree. Quote Link to comment https://forums.phpfreaks.com/topic/49772-sql-view-table/#findComment-247099 Share on other sites More sharing options...
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.