[PHP-DB] MySQL: Creating a database with

2010-05-18 Thread Alexander Schunk
Hello,

i want to create a database with php.

A look in the php manual says that you need a special 4.x MySQL
version for using
mysql_create_db().

I am getting error message: Call to undefined function mysql_create_db().

When is this function defined and in what version of MySQL?

yours sincerly

Alexander Schunk

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] php mysql comparing two rows in two columns for username and passwort

2010-04-29 Thread Alexander Schunk
Hello,

i am writing a small login script for a website.

The username and passwort are stored in a database in two separate columns.

I have it like this:

while($dbbenutzer = mysql_fetch_row($sqlbenutzername))
while($dbpasswort = mysql_fetch_row($sqlpasswort)){


   echo $dbbenutzer[$i];
   echo $dbpasswort[$j];
   if($benutzername == $dbbenutzer and $pass == $dbpasswort){
 echo 'pSie haben sich erfolgreich angemeldet/p';
 echo 'a href=willkommen.htmlWillkommen/a';
  }
}

   }

Sice the values are entries in rows in two columns, i use
mysql_fetch_row to get the entries.

Then i want to compare the returned values of the sql statement with
the values provided by the user.

My problem now is only get the first value pair of username and
passwort, not the second.
For instance the first value pair is moritz 123456 which i get
returned but i dont get returned the second value pair thomas thorr.

thank you
yours sincerly
Alexander Schunk

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php