fixed oracle SQL compatibility

This commit is contained in:
Petr Skoda 2010-08-12 12:14:05 +00:00
parent d45be41f86
commit 87150ca16b

View File

@ -95,7 +95,7 @@ function xmldb_lesson_upgrade($oldversion) {
* Move any media files associated with the lesson to use the new file * Move any media files associated with the lesson to use the new file
* API methods and structures. * API methods and structures.
*/ */
$lessons = $DB->get_records_select('lesson', 'mediafile != \'\''); $lessons = $DB->get_records_select('lesson', 'mediafile <> :empty', array('empty'=>$DB->sql_empty()));
$empty = $DB->sql_empty(); // silly oracle empty string handling workaround $empty = $DB->sql_empty(); // silly oracle empty string handling workaround
$sqlfrom = "FROM {lesson} l $sqlfrom = "FROM {lesson} l