php shopping cart
free shopping cart   shopping cart software

Free Shopping Cart PHP Software


Back to Functions List
This Function Has Been Available Since:
(AFCommerce v 2.1,     Functions v 1.1)


array = afc_sql_fetch_array (answer)

This function retrieves an array of rows from the database table returned by the database query that you pass to this function (answer). So when defining a new database type you should find the equivalent functions for the database type you want to use.

All the afc_sql functions are found in database-mysql.php (by default AFCommerce uses mysql by default). When new database types are added in to the default version, the file would be named database-dbtype.php, and if you add your own database type, you simply need to change a few lines in this file, and replace the mysql functions with the functions for the database type you are using. This establishes a universal database system that AFCommerce uses, simply include the file that declares the database functions, and AFCommerce can use any type of database out there. You would only need to change the file that the database functions are declared in, and all of the scripts will automatically use the new database type, that is the purpose of the custom database functions that version 2 uses. Inside the web directory, there is a file called "dbconfig.php" which tells AFCommerce which file to include, so you will see right now that your cart will have this variable set to "mysql", hence why the file database-mysql.php is called. If you changed this value to xxx, where xxx is the name of the database type you are using, AFCommerce will automatically know to include a file called database-xxx.php (which you would need to create if that database type doesn't exist in the default version). You only need to understand this if you are creating your own database function declaration file.


answer (string) - This is the result from the sql query, by default is the mysql query.

Return Values

Returns an array with all information about each row the sql query returned.

Open Source: Yes

Paul's Examples

There are currently no examples for this function.

Back to Functions List


There are currently no posts for this topic.

AFCommerce Documentation

High End Website DevelopmentCompletely Free
Dating Service
Copyright 2004 - 2006
AFCommerce Website
And Cart Builder