I'm refactoring an existing application which is using old methods to connect and interact with a mysql database like mysql_connect(
) and mysql_fetch_array
which had code like:
Update The only output Im getting on the page is the below, which are empty arrays.
Array ( [initial] => Array ( ) [additional] => Array ( ) )
Final update This was an issue with the root user not having access to %. I was getting an error like: The user specified as a definer ('root'@'%') does not exist
on output this is fixed by running the command:
grant all on *.* to 'root'@'%' identified by 'password' with grant option;
The reason for converting was using the originally coded use of mysql_connect()
(not by me) does not work (as far as I know) with mysql when you have remote connections turned off (which I do).
Why isn't my new code outputting anything? The original code above works in development env. where remote connections is turned off, but not in production.
Thank you.