So with the _install() and _uninstall() routines, I presume MyBB 1.4 will take a different approach to activation/deactivation?
My guess is that the aim is allow a mod to be "hidden" whilst still retaining it's settings - correct?
Tikitiki Wrote:We've added some new functions such as:
$db->replace_query(arg1 table, arg2 replacements)
$db->fetch_size([arg1 table])
$db->drop_table(arg1 table, [arg2 hard drop, [arg3 table prefix]])
$db->free_result(arg1 query resource)
Being not very good with DBs, what do some of those functions do?
I'm guessing fetch_size either returns the number of rows, or size in bytes?
drop_table is obvious.
I'm guessing free_result unset's a previously done query?
What's replace_query though? Is it like a update query for multiple rows?
Tikitiki Wrote:you can take advantage of a new variable in the database class called $db->type;
Here is an example:
switch($db->type)
{
case "pgsql":
case "sqlite3":
case "sqlite2":
$query = $db->simple_select("modtools", "tid, name, type", "','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%'");
break;
default:
$query = $db->simple_select("modtools", "tid, name, type", "CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%'");
}
Just a question, is $config['dbtype'] (forgot the exact name) still available, and the same?
Anyways, thanks!