some useful function php with mysql


Sandy | Full stack Web developer

  • mysql_connect(‘servers’,’admin’,’password’)
  • mysql_select_db(‘name of databases’)
  • mysql_query(‘sql querys’)
  • mysql_num_row(‘my sql query result’)
  • mysql_affected_row() and mysql_info() return information on the records that were affected by an insert,update,or delete query.
  • mysql_fetch_array()
  • mysql_fetch_assoc()
  • mysql_fetch_row()
  • mysql_fetch_lengths()
  • mysql_free_result() This ensures that the resultset doesn’t keep taking up space in your Web server’s memory.
  • You can only use the mysql_free_result() function with SQL statements that return results,such as SELECT queries,and only when the SQL statement successfully returned results. If you attempt to use the mysql_free_result() function with SQL statements that do not return results, such as the CREATE DATABASE and CREATE TABLE statements, or on an empty resultset, you will receive an error.

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s