Is there any way that I can use something like define() to create an alias to a database name in a MySQL query? e.g. I currently have something like
Code: Select all
$result = mysql_query
(
"UPDATE DestDb
SET
answer = '$answer'
WHERE session_id = '$session_id'
AND count = '$count_history' "
);and it wold be great if I could do
Code: Select all
define("L_DestDb", "DestDb");and subsequently use
Code: Select all
$result = mysql_query
(
"UPDATE L_DestDb
SET
answer = '$answer'
WHERE session_id = '$session_id'
AND count = '$count_history' "
);that way I can alter “DestDb” without having to trawl through my increasingly large project hunting out database instances!