Well, while I have not personnaly used the new mysqli extensions, I
note a few small issues with the script as posted.
> $conn = mysqli_connect( "localhost", "UN", "PW", "DBN" ) or die(
mysql_error() );
While that line looks ok, the manual uses the following to check for
a connection:
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
Now, in the CREATE TABLE block, you are missing the comma's that
separate the field defs:
> //Set variable to creat table if not existing
> $sql = "CREATE TABLE IF NOT EXISTS nfnpdb-t
> (
> EIN int(11), <--- here
> PNO varchar(70)
> )";
Just below that, you are making a NON mysqli query:
> if( mysql_query( $conn, $sql )) {
You should probably change that line to:
/* Create table doesn't return a resultset */
if ($mysqli->query($sql) === TRUE) {
printf("Table nfnpdb-t successfully created.\n");
}
I hope that helps.
-Charles
--------------------------------------------------
Charles Pelkey
C.P Web Designs <[EMAIL PROTECTED]>
http://cpdesigns.homeip.net/
ICQ: 8294384
AIM: cpwebdesigns
Fax & voicemail: (928) 962-2939
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/