phpmyadmin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: phpmyadmin (
/showthread.php?tid=628280)
phpmyadmin -
Loinal - 08.02.2017
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
So i want to make the gamemode and the event system in same database but in defferent tables how?
Re: phpmyadmin -
saffierr - 08.02.2017
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.
Re: phpmyadmin -
Loinal - 08.02.2017
Quote:
Originally Posted by saffierr
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
Re: phpmyadmin -
BiosMarcel - 08.02.2017
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
Re: phpmyadmin -
NaS - 08.02.2017
Quote:
Originally Posted by Loinal
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".
Re: phpmyadmin -
Loinal - 08.02.2017
Quote:
Originally Posted by NaS
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?
Re: phpmyadmin -
NaS - 08.02.2017
Quote:
Originally Posted by Loinal
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.
Re: phpmyadmin - Astralis - 08.02.2017
Quote:
Originally Posted by Loinal
didn't understand so should i make only 1 connection?
|
Merge both into one 2:1? And use only one connection for one DATABASE.
Re: phpmyadmin -
Loinal - 08.02.2017
but
PHP Code:
mysql=mysql_connect("localhost","root","zx","");
so how the system open event table not players table?
Re: phpmyadmin -
Loinal - 09.02.2017
bump