Hi,
I am still trying to figure this one out. A collegue of mine used this Function, and I modified it for myself, but exactly what does it do? It seems to be an error checking Function mostly, although it also tells specifies which feilds are to be read from the database. The only thing I can\'t figure out is, even if I call a variable that isn\'t specified in this function, eg, \'page_text04\', it still calls and displays it. So what does this function do?
Thanks,
function get_Page_Img_Details ($page) {
if (!($link=mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD))) {
displayErrMsg(sprintf(\"error connecting to db %d:%s\\n\", mysql_errno(), mysql_error()));
exit();
}
$page=addslashes($page);
if (!($result=mysql_db_query(DB, \"select pages_img.*, page_id, page_name, page_order, page_grouping, page_grouping_order, page_title, page_title_img, page_img_filename01, page_text_title01, page_text01, page_available from pages_img\"))) {
displayErrMsg(sprintf(\"error doing select %d:%s\\n\", mysql_errno(), mysql_error()));
exit();
}
$row=mysql_fetch_array($result);
return $row;
} // End function get_Page_Img_Details