Changeset 196 for trunk/includes/databaseconection.php
- Timestamp:
- Jun 5, 2009, 11:05:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/databaseconection.php
r157 r196 21 21 function SQLCommand($Command) 22 22 { 23 global $Config;23 global $Config; 24 24 25 if($Config['Web']['ShowSQLQuery'] == true)26 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: silver; padding-bottom: 2px; padding-top: 2px; font-size: 12px; font-family: Arial;">'.$Command.'</div>');25 if($Config['Web']['ShowSQLQuery'] == true) 26 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: silver; padding-bottom: 2px; padding-top: 2px; font-size: 12px; font-family: Arial;">'.$Command.'</div>'); 27 27 $ReturnCommand = mysql_query($Command, $this->id_connection); 28 if((mysql_error() != '') and ($Config['Web']['ShowSQLError'] == true))29 echo('<div>'.mysql_error().'<br>'.$Command.'</div>');28 if((mysql_error() != '') and ($Config['Web']['ShowSQLError'] == true)) 29 echo('<div>'.mysql_error().'<br>'.$Command.'</div>'); 30 30 return($ReturnCommand); 31 31 } … … 34 34 { 35 35 $return_result = mysql_query($sql, $id_spojeni); 36 if (!$return_result) 37 { 38 die('Nepodařilo se nám načíst řádky z databáze.'); 39 } else 40 { 41 return $return_result; 42 } 36 if (!$return_result) die('Nepodařilo se nám načíst řádky z databáze.'); 37 else return $return_result; 43 38 } 44 39
Note:
See TracChangeset
for help on using the changeset viewer.