2015-02-28, 02:13 PM
Hi all,
Could you, in your next release, replace table names and prefixes in different files by global variables in one file ?
For exemple :
By
And in a new file for exemple : table.php
Thanks a lot !
Could you, in your next release, replace table names and prefixes in different files by global variables in one file ?
For exemple :
$query = $db->query("
SELECT u.uid, u.username, p.pid, p.username AS postusername, p.dateline
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.tid='$tid'
ORDER BY p.dateline ASC
LIMIT 1
");
By
$query = $db->query("
SELECT u.uid, u.username, p.pid, p.username AS postusername, p.dateline
FROM ".GLOBAL_POSTS."
LEFT JOIN ".GLOBAL_USERS." u ON (u.uid=p.uid)
WHERE p.tid='$tid'
ORDER BY p.dateline ASC
LIMIT 1
");
And in a new file for exemple : table.php
define('GLOBAL_USERS', $table_prefix . 'users');
define('GLOBAL_POSTS', $table_prefix . 'posts');
Thanks a lot !