Re: A question about PHP-MySQL'basic operation
| From: | Jason Barnett | Date: | Wed, 21 Apr 2004 04:32:41 +0000 |
| Subject: | Re: A question about PHP-MySQL'basic operation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184088@lists.php.net to get a copy of this message | ||
Phplist wrote:
> php-general,您好!
>
> I've a PHP-MySQL site now.
> I've a empty database named 'dsx'.
> I'd like to creat a table named 'test' and insert some data in order to test
> the database can use now.
> Can any one give me some code about this,FROM connect TO query?
> Thank you in advance.
>
> 致
> 礼!
>
>
> PHPLIST
> phplist@enorth.com.cn
> 2004-04-21
The SQL is the same as you would do with MySQL from the command line.
(see MySQL documentation, it is good for learning basic SQL). However,
you need to create a connection to the database and then create the SQL
queries. I can't tell you exactly how to do this, it depends on what
version of PHP and what version of MySQL you are using.
See the manual, your connection/query question is answered here:
http://www.php.net/mysql