]> git.mjollnir.org Git - moodle.git/commit
ddllib: Introducing create_temp_table()
authormartinlanghoff <martinlanghoff>
Sun, 29 Apr 2007 20:31:47 +0000 (20:31 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 29 Apr 2007 20:31:47 +0000 (20:31 +0000)
commita4b6d764dd26c897d3588502791d9a749f0d0de0
treefe4e7c3e598c354874a65af1e6d262bdb7c1fdbc
parentdd3d9dcf2eee40a45637e5a14b47dee0a6c2c77c
ddllib: Introducing create_temp_table()

Close sibling to create_table() - will create a temporary table.
Two aspects of its usage are interesting

 - you _must_ truncate the table after creation as you may be
   "inheriting" an existing temp table from the former user
   of your persistent connection

 - you must use the tablename returned to support MSSQL and any
   other DB that needs special names for temp tables

A couple of TODOs

 - I just don't know how to actually munge the tablename for MSSQL
   (help! Eloooooyyyy!)

 - Surely Eloy will have something better than the preg_replace() ;-)
lib/ddllib.php