Go to the source code of this file.
Functions | |
| db_connect () | |
| db_query ($qstring, $print=0) | |
| db_numrows ($qhandle) | |
| db_free_result ($qhandle) | |
| db_result ($qhandle, $row, $field) | |
| db_numfields ($lhandle) | |
| db_fieldname ($lhandle, $fnumber) | |
| db_affected_rows ($qhandle) | |
| db_fetch_array ($qhandle=0) | |
| db_insertid ($qhandle) | |
| db_error () | |
| db_createinsertinto ($result, $table, $row, $autoincrement_fieldname, $replace_fieldname='zxry', $replace_value='axa') | |
|
|
|
Definition at line 25 of file database.php. 00026 { 00027 global $sys_dbhost,$sys_dbuser,$sys_dbpasswd,$conn; 00028 00029 $conn = @mysql_connect($sys_dbhost,$sys_dbuser,$sys_dbpasswd); 00030 if (!$conn) { 00031 fb("Failed to connect to database. Please contact as soon as possible server administrators. Until this problem get fixed, you will not be able to use this site.", 1); 00032 } 00033 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 110 of file database.php. References db_fieldname(), db_numfields(), and db_result. Referenced by trackers_conf_copy(). 00111 { 00112 unset($fields,$values); 00113 for ($i = 0; $i < db_numfields($result); $i++) 00114 { 00115 $fieldname = db_fieldname($result, $i); 00116 # Create the sql by ignoring the autoincremental id 00117 if ($fieldname != $autoincrement_fieldname) 00118 { 00119 # If the value is empty 00120 if (db_result($result, $row, $fieldname) != NULL) 00121 { 00122 00123 if ($fields) 00124 { 00125 $fields .= ","; 00126 $values .= ","; 00127 } 00128 00129 $fields .= $fieldname; 00130 # Replace another field 00131 if ($fieldname == $replace_fieldname) 00132 { 00133 $values .= "'".$replace_value."'"; 00134 } 00135 else 00136 { $values .= "'".db_result($result, $row, $fieldname)."'"; } 00137 } 00138 } 00139 } 00140 # No fields? Ignore 00141 if (!$fields) 00142 { return 0; } 00143 00144 return "INSERT INTO ".$table." ($fields) VALUES ($values)"; 00145 }
|
|
|
Definition at line 102 of file database.php. Referenced by bookmark_add(), get_next_thread_id(), people_add_to_job_inventory(), people_show_category_table(), post_message(), register_valid(), show_newest_projects(), and trackers_data_post_notification_settings().
|
|
|
||||||||||||
|
Definition at line 72 of file database.php. Referenced by db_createinsertinto().
|
|
|
Definition at line 57 of file database.php.
|
|
|
Definition at line 96 of file database.php. Referenced by forum_create_forum(), get_next_thread_id(), post_message(), register_valid(), and trackers_conf_copy().
|
|
|
Definition at line 67 of file database.php. Referenced by db_createinsertinto().
|
|
|
||||||||||||
|
||||||||||||||||
|
Definition at line 62 of file database.php.
|
1.4.4