mysql错误1054未知列?

时间:2014-09-17 18:00:01

标签: php sql xml

我一直在捣乱调整一个日历事件来准备它所以我可以让用户单击添加到日历,它将触发代码(那很多工作)但我试图添加一个结束数据库中的事件的日期,当我尝试插入它时,它没有任何数据。

<?xml version="1.0"?>
<schema version="0.3">
<table name="dsEventCalendar">
    <field name="calendarID" type="I">
        <key/>
        <unsigned/>
        <autoincrement/>
    </field>
    <field name="title" type="C" size="255">
    </field>
</table>
<table name="dsEventCalendarEvents">
    <field name="eventID" type="I">
        <key/>
        <unsigned/>
        <autoincrement/>
    </field>
    <field name="calendarID" type="I">
        <unsigned/>
    </field>
    <field name="date" type="T">
    </field>
    <field name="type" type="C" size="255">
    </field>
    <field name="title" type="C" size="255">
    </field>
    <field name="description" type="X">
    </field>
    <field name="url" type="X">
    </field>
    <field name="endDate" type="X">
    </field>
    </table>
</schema>

这是我的PHP代码似乎失败

$this->post('event_title');
             $this->post('event_date');
             $this->post('event_location');
             $this->post('event_description');
             $this->post('event_url');
             $this->post('event_endDate');
             $sql = "INSERT INTO dsEventCalendarEvents(calendarID,title,date,type,description,url,endDate) VALUES (?,?,?,?,?,?,?)";
             $args = array(
                   $this->post('event_calendarID'),
                   $this->post('event_title'),
                   $this->post('event_date'),
                   $this->post('event_location'),
                   $this->post('event_description'),
                   $this->post('event_url'),
                   $this->post('event_endDate')
             );
             $db->Execute($sql, $args); //death, immediate death
             echo "killed";

如果有人能够看到我可能正在创造的愚蠢错误,那就太棒了,因为我不知所措。

0 个答案:

没有答案