phpmyadmin
#1

Hello i have my own gamemode and i use SX event system R41-2

So my own gamemode uses database zx in table players

and SX event have onther database

like My gamemode

Code:
mysql=mysql_connect
and event system

Code:
sql=mysql_connect
So i want to make the gamemode and the event system in same database but in defferent tables how?
Reply
#2

Just create a new table in your own database and make the SQL queries so that you connect them to your own table in your own database.
Self explanatory lol.
Reply
#3

Quote:
Originally Posted by saffierr
View Post
Just create a new table in your own database and make the SQL queries so that you connect them to your own table in your own database.
Self explanatory lol.
I made not working

i have

mysql=mysql_connect("localhost","root","zx","");

so i tried to make that and type same info in the event connection not working
Reply
#4

Do you even know what tables and databases are? 1 DB contains more tables. Just copy the table structure from DB "a" to DB "b" and you are done
Reply
#5

Quote:
Originally Posted by Loinal
View Post
I made not working

i have

mysql=mysql_connect("localhost","root","zx","");

so i tried to make that and type same info in the event connection not working
If I got you right you tried to open 2 connections to the same Database (Event system and the other one - but they are now one and the same!) That is not neccessary. You just need 1 connection. AFAIK this doesn't work on purpose, at least by default.

You keep the queries like they were before, just that you move the tables (all contents of the other database) to your own Database. Then you only need one connection to your own Database.

If "zx" is now the new Database with all contents, the code above should be ok and it should work like expected. Like I said the queries remain the same. Make sure all queries and mysql functions are executed on the connection to "zx".
Reply
#6

Quote:
Originally Posted by NaS
View Post
If I got you right you tried to open 2 connections to the same Database (Event system and the other one - but they are now one and the same!) That is not neccessary. You just need 1 connection. AFAIK this doesn't work on purpose, at least by default.

You keep the queries like they were before, just that you move the tables (all contents of the other database) to your own Database. Then you only need one connection to your own Database.

If "zx" is now the new Database with all contents, the code above should be ok and it should work like expected. Like I said the queries remain the same. Make sure all queries and mysql functions are executed on the connection to "zx".
didn't understand so should i make only 1 connection?
Reply
#7

Quote:
Originally Posted by Loinal
View Post
didn't understand so should i make only 1 connection?
Yes, if you have all tables in one database, there is simply no need to have 2 connections to the same database. By default the second connection should be refused by the MySQL Server, that could be why it didn't work for you.
Reply
#8

Quote:
Originally Posted by Loinal
View Post
didn't understand so should i make only 1 connection?
Merge both into one 2:1? And use only one connection for one DATABASE.
Reply
#9

but
PHP Code:
mysql=mysql_connect("localhost","root","zx",""); 
so how the system open event table not players table?
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)