Jump to content

Recommended Posts

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 do
1.INT
2.NOT
3.NULL
4.AUTO INCREMENT

And 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.
Link to comment
https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/
Share on other sites

PHP source code cannot be grabbed unless the creator makes in available in a php-source MIME type
usually has the extension [b].phps[/b]

PHP means Hypertext PreProcessor...so think of it as an HTML generator
you make code to either logically make HTML code, or systematically make it.

If someone did you a program to steal a PHP file
like flashGet or getright
all they would attain is the preprocessed HTML



and as for your vocab questions
1.INT = a number type
2.NOT = self explanatory
3.NULL = nothing
4.AUTO INCREMENT = increment by one for every row
Link to comment
https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32410
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/8828-mysql-sql-syntax/#findComment-32713
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.