Changeset 89 for db/index.php
- Timestamp:
- Sep 30, 2007, 12:28:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
db/index.php
r82 r89 12 12 @mysql_connect( $Config['DB_read']['Database']['Host'], $Config['DB_read']['Database']['User'], $Config['DB_read']['Database']['Password'] ) 13 13 OR DIE("<p>Vyskytla se chyba a nelze se připojit k databázi.<br> Zkuste to později.</p>"); 14 @mysql_select_db($Config['DB_read']['DB_read']['Database']) 15 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database']."!</p>"); 14 $DB_mangos = mysql_select_db($Config['DB_read']['DB_read']['Database_mangos']); 15 if( !$DB_mangos ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>"); }; 16 /* $DB_realmd = mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']); 17 if( !$DB_realmd ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); }; 18 $DB_web = mysql_select_db($Config['DB_read']['DB_read']['Database_web']); 19 if( !$DB_web ){ DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); }; */ 16 20 @mysql_query("SET NAMES ".$Config['DB_read']['DB_read']['Charset']); 17 21 … … 29 33 }; 30 34 31 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID ){32 $pocet_radku = @mysql_num_rows(mysql_query($sql ));35 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID ,$DB){ 36 $pocet_radku = @mysql_num_rows(mysql_query($sql,$DB)); 33 37 if( $pocet_radku > 0 ) { 34 38 $listovani = $pocet_radku/10; … … 101 105 }; 102 106 103 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID ){104 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID );105 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu " );107 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID, $DB){ 108 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID, $DB); 109 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu ",$DB); 106 110 $vysledek = array( '1' => $dotaz, 107 111 'strankovani' => $navigace );
Note:
See TracChangeset
for help on using the changeset viewer.