philip / MySQLConverterTool

A MySQL Converter Tool
314 stars 144 forks source link

SelectDB: Support when database argument is array #1

Closed mfalkvidd closed 9 years ago

mfalkvidd commented 10 years ago

When using mysql statements like mysql_select_db($cfg["mysqldb"]); the tool produced invalid php syntax: ((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE $cfg["mysqldb"]")); resulting in PHP Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING

After this patch, the result is ((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE " . $cfg["mysqldb"]));

A test should be added, but I am not skilled enough to add one :(

§