Learn more with dummies

Enter your email to join our mailing list for FREE content right to your inbox. Easy!

Communicate with a Database through PHP MySQL Functions

By Janet Valade

Part of PHP & MySQL For Dummies Cheat Sheet

PHP communicates with MySQL databases by using a set of functions developed specifically for this purpose. This list shows the syntax of these frequently used functions.

mysqli_connect("host","accnt","passwd")
mysqli_select_db($cxn, "dbname",)
mysqli_query($cxn,"query")
mysqli_fetch_assoc($result)
mysqli_num_rows($result)
mysqli_insert_id($cxn)