679Chapter 36PEAR Database Functions .DB_Common::affectedRows(): Returns the number (Florida web design)
679Chapter 36PEAR Database Functions .DB_Common::affectedRows(): Returns the number of rows affected by a query. .DB_Common::disconnect(): Disconnects a database connection. .DB_Common::getAll(): Returns all rows returned by a query. .DB_Common::getAssoc(): Returns all rows as an associative array. .DB_Common::getCol(): Returns all rows in a specified column. .DB_Common::getOne(): Returns the value in the first column of the first row. .DB_Common::getRow(): Returns the first row. .DB_Common::nextId(): Allows you to exercise extra control over the establishment ofunique id values, as in a primary key column. .DB_Common::query(): Sends an SQL query string. Members of the DB_Result classThe members of the DB_Resultclass may be invoked on a result set, which is what existsafter a query is run on a database. .DB_Result::fetchInto(): Extracts a row into a specified variable. .DB_Result::fetchRow(): Extracts the next row. .DB_Result::free(): Destroys the result set. .DB_Result::numCols(): Returns the number of columns in a result set. .DB_Result::numRows(): Returns the number of rows in a result set. SummaryThis chapter showed you how to use PEAR DB, the class with which PHP makes databaseconnectivity more generic. You saw that PEAR DB is designed to make the task of switchingfrom one database server to another extremely easy and that it generally succeeds in thisdesign goal. In many cases, switching connectivity from one database server to anotherrequires the modification of only one word in a whole database-enabled program. The process of connecting to a database via PEAR DB involves establishing a DSN, which isessentially a URL for a database. The DSN specifies the hostname of the database server, aswell as the database name, and the username and password required to gain access to thedatabase. With a valid DSN, it s possible to establish a connection, run a query, and extractrows of values from the query s results before disconnecting. PEAR DB also includesmethods which you should take care to use for detecting error and warning conditions. …
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.