![]() |
|
#1
|
|||
|
|||
[Tutorial] MySQL BasicsI know Perl, and PHP (a little), but I need to learn how to use MySQL so I was wondering if anyone knows of any good php, perl, or MySQL tutorial/reference sites?
Nick |
|
#2
|
||||
|
||||
|
for php and php/mysql and how they work together I like Evil Walrus www.evilwalrus.com
|
|
#3
|
||||
|
||||
|
Just ask Nick and I might even write whole articles just for you
![]() __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
|||
|
|||
|
Evil Walrus is down. JdS, with all of the wonderful luck I am having
Nick |
|
#5
|
||||
|
||||
|
MySQL is really simple, so tell us what you want to do and we will try to post some sample code here.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#6
|
|||
|
|||
|
Well I need to learn the basics about MySQL and how it works and the neat things that it will do. I am working on a quiz/survey script. I am using a win 2k system with everything on it. I don't know if I will use Perl or PHP, or maybe both.
Nick |
|
#7
|
||||
|
||||
Connecting to the MySQL database.Here's how you could connect to a MySQL database:
PHP Code:
I personally would use mysql_pconnect() only if my website was on a dedicated server. If on a shared / virtual host, I would stick with mysql_connect(). __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#8
|
|||
|
|||
|
So how do I make the structure of a new db?
Nick |
|
#9
|
||||
|
||||
Create a new MySQL database tableTo create a MySQL database table, listed below are some of the available options:
Let's say you want to create a table named: members in the database named nicksdb. The structure of this fictitious table is something like this: Code:
In other words, this db table will contain 4 columns. You create this table and the four columns much like you would an MS Access database table - defining the column type, size, etc... A sample php page that would create this particular sample database table could look something like this: PHP Code:
Now when you bring up this file; install.php on your browser, it should create a table named members in the database named nicksdb! __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#10
|
|||
|
|||
|
How many tables can one db hold and how do you create relationships between them? Also "TINYINT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT" these are really cool constrainsts to put on a field in a table but what all can be used and what do they do?
Nick |
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A problem Between MySQL <> phpBB | mirable | MySQL / PHP Forum | 3 | 10-Sep-2003 05:31 |
| Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More | EyotaHosts | Web Hosting Advertisements & Offers | 0 | 28-Jun-2003 13:54 |
| [Tutorial] XSL Basics Pt. III | pcxgamer | Web Design Forum | 1 | 24-Apr-2003 08:04 |
| [Tutorial] XSL Basics Pt. I | pcxgamer | Web Design Forum | 15 | 22-Apr-2003 06:59 |
| [Tutorial] XSL Basics Pt. II | pcxgamer | Web Design Forum | 0 | 21-Apr-2003 07:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The