Thread subject: pHpFusion Nederlands (BE|NL) » Ondersteuning, Themas, Infusies, Modificaties en Installatie :: PHP-MySQL Help

Posted by douwe_yntema on 25 februari 2019, 22:14

I Looked at your file, but you are saying pulling data from a table without use of maincore.php, but maincore.php is included in your script, in line 13.

furthermore the name fusion_players18 is the name of the database as a constant, but is this constant declared somewhere? Not in your script. There should be something like:
define("FUSION_PLAYERS18", DB_PREFIX."players18"); or use the name as a string, so it would be "fusion_players18" with quotes
Constants are always in capitals.

Keep in mind you are making a database connection in line 8, but are also including maincore on line 13, but on maincore there is also a connection made to a database. You can only have one connection active at a moment, so after calling maincore.php, your connection in line 8 is lost.

with mysqli_select_db you can select different database on same connection. In the past I made a script to switch to another database via another connection, but that was with mysql, not mysqli. You had to force a new connection by adding a parameter True for option force new link. But mysql is deprecated now. I don't know if this works with mysqli

Hope I pointing you some directions.

btw: What exactly goes wrong with your scrip? Smile