There could be a few reasons for this:
File path: The file path used in the include or require function may not be correct in some of the files. Make sure to use the correct file path for each file.
Connection already established: If the connection is already established in one file, it may not be necessary to establish it again in another file. Make sure to check if the connection is already established before establishing it in each file.
Code errors: There may be errors in the code of the other files that are preventing the SQL connection from functioning properly. Check for syntax errors or logical mistakes in the code.
Permissions: The user permissions may not be set up correctly for accessing the database in some files. Ensure that the user has the necessary permissions to access the database in all files.
Database configuration: The database configuration may be different between the files, such as a different database name or password. Check that the configuration is the same for all files.
Asked: 2022-12-09 11:00:00 +0000
Seen: 11 times
Last updated: Jul 24 '21