09.06.2013, 09:05
Hello everybody.I am thinking to make my own Ban system which will be based on MySQL.But for MySQL I am planing to make new table and there to insert bans.But how to connect two tables same time??
new MySQL:connection1, MySQL:connection2;
Try to add two "mysql_connect" lines with 2 different tables... and use a MySQL variable like
Код:
new MySQL:connection1, MySQL:connection2; In the mysql query you need to add the current table you want to address in the code... For the exact useage of that mysql code you might need to ******, I'm not quite sure how it looks anymore, although I know that there is a certain way to code the query for such cases... I guess it should work with SA-MP, too. |
SELECT `bans.username`, `user.rank` FROM `bans`, `user`
I've checked my old IT stuff and found the coding I mentioned above...
you can use something like that in the query: Код:
SELECT `bans.username`, `user.rank` FROM `bans`, `user` Hope that saves you some time, and you get what you need out of it ... @Ld Est Ld: sometimes it better to have different tables. |