Changeset 89 for db/post_read.php
- Timestamp:
- Sep 30, 2007, 12:28:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
db/post_read.php
r84 r89 7 7 if( !empty($q) AND !empty($id) ){ 8 8 if( !empty($lvl_d) AND !empty($lvl_h) ){ $where = "(`MinLevel`>='$lvl_d' AND `MinLevel`<='$lvl_h') AND "; }; 9 $sql_select = SQLselect_Strankovani("SELECT * FROM quest_template WHERE ( $where`Title` LIKE '%$q%' )", $limit, 20, "?id=questy&q=".$q."&lvl_d=".$lvl_d."&lvl_h=".$lvl_h, $SID );9 $sql_select = SQLselect_Strankovani("SELECT * FROM quest_template WHERE ( $where`Title` LIKE '%$q%' )", $limit, 20, "?id=questy&q=".$q."&lvl_d=".$lvl_d."&lvl_h=".$lvl_h, $SID, $DB_mangos); 10 10 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 11 11 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; … … 18 18 $sql_select['result'] .= "<td>"; 19 19 20 $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." " );20 $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." ",$DB_mangos); 21 21 while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){ 22 22 $sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>"; 23 23 }; 24 $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." " );24 $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." ",$DB_mangos); 25 25 while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){ 26 26 $sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>"; … … 37 37 } 38 38 elseif( !empty($quest) AND empty($id) ){ 39 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='$quest' LIMIT 1;" );39 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='$quest' LIMIT 1;",$DB_mangos); 40 40 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 41 41 $result = MySQL_Fetch_Array($sql_select['sql']); … … 43 43 44 44 // Zjištění creatur a gameobjectů kde se Quest dá vzít 45 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$sql_select['quest']['entry']." " );45 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$sql_select['quest']['entry']." ",$DB_mangos); 46 46 if( @mysql_num_rows($startovni_NPC_dotaz_creature) > 0 ){ 47 47 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_creature)){ 48 48 $sql_select['other']['StartNPC'] .= "<a href=\"index.php?creature=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 49 49 }; }; 50 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$sql_select['quest']['entry']." " );50 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$sql_select['quest']['entry']." ",$DB_mangos); 51 51 if( @mysql_num_rows($startovni_NPC_dotaz_gameobject) > 0 ){ 52 52 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_gameobject)){ … … 61 61 62 62 // Důležitá věc 63 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$sql_select['quest']['SrcItemId']." LIMIT 1;" );63 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$sql_select['quest']['SrcItemId']." LIMIT 1;",$DB_mangos); 64 64 if( @mysql_num_rows($SrcItemId_dotaz) > 0 ){ 65 65 $SrcItemId = @MySQL_Fetch_Array($SrcItemId_dotaz); … … 107 107 } 108 108 elseif( !empty($creature) AND empty($id) ){ 109 $sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='$creature' LIMIT 1;" );109 $sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='$creature' LIMIT 1;",$DB_mangos); 110 110 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 111 111 $result = MySQL_Fetch_Array($sql_select['sql']); 112 112 $sql_select['creature'] = $result; 113 113 114 $questy_dotaz_creature = mysql_query("SELECT * FROM `creature_questrelation` LEFT JOIN `quest_template` ON `creature_questrelation`.`quest` = `quest_template`.`entry` WHERE (`creature_questrelation`.`id` =".$sql_select['creature']['entry']." AND `quest_template`.`PrevQuestId`=0 ) " );114 $questy_dotaz_creature = mysql_query("SELECT * FROM `creature_questrelation` LEFT JOIN `quest_template` ON `creature_questrelation`.`quest` = `quest_template`.`entry` WHERE (`creature_questrelation`.`id` =".$sql_select['creature']['entry']." AND `quest_template`.`PrevQuestId`=0 ) ",$DB_mangos); 115 115 if( @mysql_num_rows($questy_dotaz_creature) > 0 ){ 116 116 while($quest_NPC = @MySQL_Fetch_Array($questy_dotaz_creature)){
Note:
See TracChangeset
for help on using the changeset viewer.