Question

i am trying to update my form but i got the error, my code is

$qs= Doctrine_Query::create()
                ->update('login l')
                ->set('l.username', $name)
                ->set('l.message', $message)
                ->set('l.email', $email)
                ->set('l.subject', $sub)
                ->set('l.doc', $path)
                ->where('l.id=?',$id)
                ->execute();
                $this->redirect('user/show?id=' . $id);
Was it helpful?

Solution

Print out the SQL statement:

$qs= Doctrine_Query::create()
                ->update('login l')
                ->set('l.username', $name)
                ->set('l.message', $message)
                ->set('l.email', $email)
                ->set('l.subject', $sub)
                ->set('l.doc', $path)
                ->where('l.id=?',$id);
echo $qs->getSQL();

Check the statement for syntax error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top