[thelist] php+mySQL
Burhan Khalid
burhankhalid at members.evolt.org
Thu May 23 13:09:01 CDT 2002
> // Accessing the database
>
> $db_connect = mysql_select_db("$db_name", $link) or die ("Could not find
the
> database.");
> mysql("CREATE TABLE $db_tablename ($name char(20) NOT NULL,$description
> char(50) NOT NULL,$version char(20) NOT NULL)");
>
>
> mysql("INSERT INTO $db_tablename VALUES ($s_name, $s_description,
> $s_version)");
> printf ("<br>Records affected: %d\n", mysql_affected_rows());
>
> ?>
>
Hey Mark :
You say that the database is created, but the tables aren't? Might be a
matter that the mySQL database information has to be "refreshed".
I'm not a mySQL expert, so I can't really tell you how to do this, but a
thought comes to mind that if you closed your connection and reopened
it, that might help. Also, I am not familiar with mysql(), I always use
mysql_db_query("querystring").
hth,
Burhan Khalid
More information about the thelist
mailing list