>  Was anyone else completely annoyed by the way most
> of the params were switched between mysql and mysqli where the db link was
> required and put as the first param in most functions?

Nah... just use the object notation, and it actually makes more sense.

*new way*
$db_conn = new mysqli("localhost", "my_user", "my_password", "world");
$cursor = $db_conn->query("SELECT first_name FROM Users LIMIT 0,10");
while($row = $cursor->fetch_assoc()) {
  echo $row['first_name'];
}
$cursor->close();

*old way*
$link = mysql_connect("localhost", "my_user", "my_password", "world");
$cursor = mysql_query("SELECT first_name FROM Users LIMIT 0,10");
while($row = mysql_fetch_assoc($cursor)) {
  echo $row['first_name'];
}
mysql_free_result($cursor);

There is slightly less typing with the new way, and it will work with
mutiple connections. :)

Regards,
John Campbell
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to