I’ve trying to make too queries to different tables in the database but one query causes problems with the other.
This query works okay
usedb( $GLOBALS['country_modules'][$GLOBALS['code']]['db_ex'],"dbExter" );
$query="select id,name from symbols,symbols_map where symbol_id=symbols.id and visible=1 and id=".$GLOBALS['group_id'][$key]['id']." order by name";
$symbols_group=dbselect( $query,"dbExter" );
but if I then use this one too:
usedb( $GLOBALS['country_modules'][$GLOBALS['code']]['db_ex'],"dbExter" );
$query="select * from bullets where group_id=".$GLOBALS['group_id'][$key]['id']." and country like \"%".$GLOBALS['code']."%\" order by pos";
$bullets_group=dbselect( $query,"dbExter" );
then I get this error:
Query failed:
select * from bullets where group_id= order by pos
(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘order by pos’ at line 1)
The second query works on it’s own without any errors though.