topical media & game development
#mobile-ar-8-12.txt / txt
// Put fetched object related parameters for each POI into an associative
// array. The returned values are assigned to
//
// Arguments:
// poi ; The POI handler.
// db ; The database connection handler.
//
// Returns:
// array ; An array of received object related parameters for this POI.
//
function Getobject( db ) {
// A new table called “OBJECT_Table” is created to store object related
// parameters, namely “baseURL”, “full”, “reduced”, “icon”, and “size”.
// “poiID” which shows the POI id that this object belongs to.
// The SQL statement returns object which has the same poiID as
// the id of poi[‘id’]).
db->prepare( “ SELECT baseURL, full, reduced, icon, size
FROM OBJECT_Table
WHERE poiID = :id
LIMIT 0,1 “ );
// Binds the named parameter markers “:id” to the specified parameter
// values “
sql_object->bindParam( ‘:id’, sql_object.
object = object result */
// if
if ( empty( object ) ) {
poi[“object”]
object[0];
// Change “size” type to float.
poi[“object”][“size”] );
}//else
return
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.