0

这段代码我真的搞不定……我需要帮助……我在论坛上搜索了但是没有关于return 1 row < multi row的主题

这是一个for循环:

for (global.id_increment = 0; global.id_increment < global.max_increment; global.id_increment++)
{
     q = GMSQL_QueryExecute(db,
            "INSERT INTO Users (id, name, password, age)
             SELECT " + string(global.id_increment) + ",'User', 'Pass', 14
             FROM dual
             WHERE NOT EXISTS (
                SELECT id
                FROM Users
                WHERE Users.id = " + string(global.id_increment) + "
                LIMIT 1
            )
     ");      
}
  • GMSQL_QueryExecute 是 GMS 的 DLL
  • 此脚本受精灵(对象)的影响,用于在空 id.row 中添加行

更多解释

ID Users :  01   02   03   04   05   06   07   08   09   (all rows)
            01   02        04   05   06             09   (case empty)
                     03                  07   08         (query actual return)
                     03                                  (the return searched :
                                                       the "first match" enable)

我不知道为什么 LIMIT 1 不起作用

所以我真的需要帮助


如何处理?

4

0 回答 0