This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-04 19:33:53

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

PHP/MySQL/Other: Commonly Used Incorrect Code/Data

I swear I feel like I'm answering the same questions over and over ( even though I'm not ) but I still feel like making this. This is also a list on what I've learned. This also has other stuff that is good "etiquette" I guess...  smile

Do not use "To" or "to" for MySQL columns.
Do not add ", $varWithLinkToMySQLDatabase" to MySQL queries unless you plan on having multiple connections to multiple databases ( which I suggest not doing ).
Make sure column names don't have any special characters ( *&^%$#@!) and do not start with a capitol letter.
Make sure you have semi-colons ( ; ) at the end of each command.
Make sure to close all brackets ( {, }, (, ), [, ] ).
Make sure to have comments. ( Good etiquette, right? Of course my code doesn't have any comments... )
When you set limits to specific columns, make sure the data you are submitting is within that limit.

Now this is obviously a very small list, have any other ideas that could be added? Common mistakes? FAQs?

Offline

 

#2 2011-11-04 19:40:25

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: PHP/MySQL/Other: Commonly Used Incorrect Code/Data

Great! For people fairly new to MySQL, these are very useful tips!


Fork Clamor on GitHub!

Offline

 

#3 2011-11-04 20:54:53

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: PHP/MySQL/Other: Commonly Used Incorrect Code/Data

People sometimes make the mistake of using MySQL.


(joke)


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#4 2011-11-04 20:58:25

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: PHP/MySQL/Other: Commonly Used Incorrect Code/Data

Greatdane wrote:

People sometimes make the mistake of using MySQL.


(joke)

That is true............ Supposed to use MySQL2 or something............

Offline

 

Board footer