Joel: I had the same problem you did, the script isn't wrong it's just
that even though the PHP manual says to use the sintax you used, the
actual sintax for mysql_select_db and for mysql_query or mysql_result
is:

mysql_select_db(string db_name)
mysql_query(string query_string)
mysql_result(string query_string)

At least that's how it worked for me.

Later.

Iván

-----Mensaje original-----
De: Joel [mailto:[EMAIL PROTECTED]] 
Enviado el: Viernes, 27 de Julio de 2001 01:08 p.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] Why doesn't this work?


I'm trying to create table in a database using PHP with MySQL. I want
the script to do it on its own, I tried but couldn't get it to work. The
script is below : <?php $db =
mysql_connect("localhost","myusername","mypass");
mysql_select_db("sitesko2",$db);
$sql = "CREATE TABLE computers (Email TEXT not null , Username TEXT not
null , Password TEXT not null )"; mysql_result($sql,$db); echo
"<B>DONE!</B>"; ?>

Please let me know whats going wrong in that.

Thanks,

--
Joel Agnel.
[EMAIL PROTECTED]




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to