Ninjakreborn Posted May 1, 2006 Share Posted May 1, 2006 there are a few things I am trying to figure out the meaning of but haven't seen any information about what these specifically mean, or do1.INT2.NOT3.NULL4.AUTO INCREMENTAnd when doing a mysql connect like[code]mysql_connect("localhost", "west", "darkwind");mysql_select_db("test");[/code]The password I changed here, but basically what I am wondering is, say for instance someone playing around with a website, they can pull the website pages so they can see hte php source code, it's not that hard, they can get it to where they can read it, I have done it just to try and get some knowledge on how other people use code, so I can understand some of what is going on, well if someone does that, won't they automatically get ahold of your username, password, database name, and be able to connect to your database using that, without that much hassle, hopefully someone can explain this so I am not so paranoid. Quote Link to comment https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/ Share on other sites More sharing options...
Zane Posted May 1, 2006 Share Posted May 1, 2006 PHP source code cannot be grabbed unless the creator makes in available in a php-source MIME typeusually has the extension [b].phps[/b]PHP means Hypertext PreProcessor...so think of it as an HTML generatoryou make code to either logically make HTML code, or systematically make it.If someone did you a program to steal a PHP filelike flashGet or getrightall they would attain is the preprocessed HTMLand as for your vocab questions1.INT = a number type2.NOT = self explanatory3.NULL = nothing4.AUTO INCREMENT = increment by one for every row Quote Link to comment https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32410 Share on other sites More sharing options...
Ninjakreborn Posted May 1, 2006 Author Share Posted May 1, 2006 thanks Quote Link to comment https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32418 Share on other sites More sharing options...
fenway Posted May 2, 2006 Share Posted May 2, 2006 You should consider including a PHP script that connects to your DB instead of hard-coding this at the top of every script.As far as your keywords, you should be aware that NULL has many implications for query performance, particularly as it relates to indexes. I remember a few posts where this was discussed at length; use this sparingly. WRT "INT", be aware of the size limitation, and consider the UNSIGNED attribute. For auto-increment, this only applies to newly inserted records where you do not explicitly request a particular value -- and without a primary key index on this column, it's quite meaningless. Quote Link to comment https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32713 Share on other sites More sharing options...
Ninjakreborn Posted May 2, 2006 Author Share Posted May 2, 2006 thanks Quote Link to comment https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32714 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.