*

Anonymous

  • ****
  • 200 posts
hidden error sql
« on: January 12, 2018, 04:51:29 PM »
UPDATE oc_t_banner SET b_views=coalesce(b_views, 0)+1 WHERE b_id=0μs
[1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


how to solve it,

 public function updateViews( $id ) {
    return $this->dao->query('UPDATE '.$this->getTable_Banner().' SET b_views=coalesce(b_views, 0)+1 WHERE b_id='.$id);
  }
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: hidden error sql
« Reply #1 on: January 12, 2018, 06:55:55 PM »
You have incorrect id in where clause
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: hidden error sql
« Reply #2 on: January 13, 2018, 05:14:38 AM »
 ??? ::)

Pls check the uploaded screenshot,
That's the real pic of error,

User id?
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: hidden error sql
« Reply #3 on: January 13, 2018, 10:13:52 AM »
Check first line you posted
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: hidden error sql
« Reply #4 on: January 14, 2018, 05:43:09 PM »
 :)
thats dummy copy, by mistake copied.

Quote
WHERE b_id=0μs

image is real.
all error output represent through pic
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: hidden error sql
« Reply #5 on: January 14, 2018, 05:49:20 PM »
Error reference to that line. It must be integer.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots