Script47 Posted April 9, 2013 Posted April 9, 2013 I've got a simple MySQL code, which takes inputted information then put's it in to a table, I was wondering if I could do that but put the MySQL code in a different file then use the include function to call it up in my php file. If I can should I do it or is there no need? Quote
sniko Posted April 9, 2013 Posted April 9, 2013 There's probably no need to. If you do, and you do it indefinitely, you'll have a lot of 1KB files - which isn't nice to eyes, my eyes anyway. May I ask why you'd want to put it in a different file? Answering your question, they'd have to be stored in a super-global, such as _POST or _GET, sanitized and filtered in the file containing the query, and then processed. Quote
Script47 Posted April 9, 2013 Author Posted April 9, 2013 May I ask why you'd want to put it in a different file? Yeah sure, I was honestly just wondering, it's just struck me and I was wondering if I could, thanks for the reply:) Quote
Zettieee Posted April 11, 2013 Posted April 11, 2013 They is such things as flat db structure's. They are sort of what you are asking but with a game you shouldn't really (not for all your info) use this sort of db. Quote
Lucifer.iix Posted November 17, 2013 Posted November 17, 2013 I've got a simple MySQL code, which takes inputted information then put's it in to a table. Do you mean PHP code that fires a mysql execute function with a insert statement into a table ? Or a stored procedure that has params that will be inserted ? Please give more information: - What do you try to do. (Like: Take input from GUI, check constains, insert in table...... jada, jada, jada....) - What is your (best) motivation to do it. (Like: performance, clean coding, patterns, testing...) Thanx. Happy Hacking: Roger 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.