MySQL Event query error #1064

I'm trying to create an event for MySQL which should change some values when the date (Datum) is less than today. I used the CURDATE() format because that works best for me.

CREATE EVENT `test_event_date` ON SCHEDULE EVERY 1 MINUTE DO BEGIN UPDATE users SET Subbed='Yes', Datum='' WHERE Datum < CURDATE(); END;

I set it to 1 minute just for test purposes ;)

But when i try this it gives me the following error:

#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 6

But iv'e checked it multiple times, and tried values without '' and i tried CURDATE() with '', but nothing seems to work.

Please help :c

-------------Problems Reply------------

It works now!

I needed the DELIMITER // to get it to work

DELIMITER //

CREATE EVENT `test_eventdate`
ON SCHEDULE EVERY 1 MINUTE
DO BEGIN
UPDATE users
SET Subbed='Yes', Datum=''
WHERE Datum < CURDATE();
END;

Category:mysql Views:0 Time:2019-01-09
Tags: mysql

Related post

  • MySQL empty sintax error 1064 2011-01-16

    I was executing in many ways (via php, via phpMyAdmin and via mysql client in terminal shell) a query, this query: SELECT id,titolo,luogo,data_ora FROM eventi WHERE data_ora BETWEEN(1293836400 AND 1296428400); And the result i get is always the same:

  • Mysql trigger syntax error 1064 2011-06-15

    I have a very large file that creates triggers that I auto generated. However I'm not able to get passed line 3. Php version 5.3.2 Mysql Version 14.14 Distrib 5.1.41 Here are the first few lines: 1 delimiter $$ 2 -- CompanyTitleHolder 3 -- Create INS

  • Creating functions in mysql doesnt work - Error 1064 2010-09-30

    I tried this example via phpMyAdmin http://www.databasejournal.com/features/mysql/article.php/3569846/MySQL-Stored-Functions.htm mysql> DELIMITER | mysql> CREATE FUNCTION WEIGHTED_AVERAGE (n1 INT, n2 INT, n3 INT, n4 INT) RETURNS INT DETERMINIST

  • mysql insert query error 2010-12-10

    Can anyone tell me why the following query is not correct ? insert into Table2 (column_1, Timestamp, column_3) values ('name', Select current_timestamp as ts, Select age from Table1 where Name = "my_name") This is the error I get : #1064 - You have a

  • Mysql throwing query error yet finishing query just fine-why? 2008-11-13

    I am getting Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in *filename* on line 81 While running a query to build a chart. The query gets data from the mysql db and uses it to build the chart. Usually, I get th

  • MySQL select query Error 2010-01-15

    My query is throwing an error like select id,cHospital from med_patient where cHospital is not null union select id,cHospital1 from med_patient where cHospital1 is not null union select id,cHospital2 from med_patient where cHospital2 is not null orde

  • Django MySql Raw Query Error - Parameter index out of range 2010-02-11

    This view is running fine on plain pyton/Django/mysql on Windows I'm porting this to run over jython/Django/mysql and it gives error - Exception received is : error setting index [10] [SQLCode: 0] Parameter index out of range (10 > number of param

  • mysql database querying error, querying table gives error 2011-06-05

    I logged into the CPanel of my website. I created a database called prouser_inventory using CPanel's MySQL Database Wizard. Then, I created a user for the above database called prouser_invuser which I granted all privileges to. Then I made a table pr

  • PHP MySQL DB query error 2012-04-10

    I am trying to get the top 10 items from a table: <?php include DBConnect.php; $dbname = 'Telejoke'; mysql_select_db($dbname); $query = "SELECT * FROM jokes LIMIT 10"; $data = mysql_query($query) or die('Error, insert query failed'); mysql_close($

  • Out of memory exception while registering to a WMI event query 2009-11-10

    Short: What could cause an out-of-memory error when registering a WQL event query (error code 0x80041006)? How can we investigate the cause? Long: We keep getting an out-of-memory exception when trying to register a specific WQL event query in the Mi

  • php -> MYSQL query can't figure out what is wrong getting error #1064 2011-11-03

    I am trying to insert some values in the table the query is below: Insert into auditlog ( event, desc, userid, useripaddress, audittype ) VALUES ( 'User Authenticated', 'Useradminsuccessfully logged in to the system', '1', '127.0.0.1','1' ) It gives

  • MySQL error 1064 when performing an SELECT query 2012-03-29

    I have code like this: function search_keyword(){ $keyword = trim($_POST['keyword']); $search_explode = explode(" ", $keyword); $x = 0; $sql = " ( SELECT name, id_global_info AS id, body AS body, tag AS tag ,info_type_id AS info_type, \"global_info\"

  • MySQL query giving error 1064 - any ideas? 2011-04-27

    This query: UPDATE jos_content SET fulltext='\r\n<br /> \" some other text' WHERE id=3 gives: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use n

  • MySQL: ERROR 1064 (42000) - Why is ORDER BY failing? 2010-08-31

    as a limit 0,50 ORDER BY SortOrder, paid desc, ae desc, name asc, title asc ERROR 1064 (42000): 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 'ORDER BY SortOrder,

  • Unable to import MYSQL function - ERROR 1064 (42000) 2010-10-01

    I'm trying to understand why the following is failing and I'm not able to see it. The phpMyAdmin on our development server generated this exactly, but when I try importing it - I'm running into a weird parsing(?) error. mysql> DELIMITER $$ mysql

  • Can't seem to create user in MySQL console (ERROR 1064 (42000)) 2011-01-24

    Now I'm no MySQL pro, but I've been using it for a good 5-6 years and I've never come across this: I log into my server via SSH I log into MySQL via mysql -u root -pSUPER_SECRET_PASSWORD I write: CREATE USER 'magical_username'@'locahost' IDENTIFIED B

  • mySQL table creation fails - error 1064 2011-03-22

    I am using the mysql admin GUI tool to create a table. Here is the query language that results in an error: CREATE TABLE `environment`.`moisture` ( `city_id` INT, `date_holding` VARCHAR, `time_holding` VARCHAR, `open` REAL, `high` REAL, `low` REAL, `

  • Error 1064 - SQL syntax in MySQL for an INSERT statement 2011-06-13

    i am trying this query but didn't work. ERROR: #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 '= (SELECT id_university FROM university WHERE university = "

  • MySQL Error #1064 . . . intermittently? 2011-06-28

    Details Mac OS X Snow Leopard 10.6.7 MAMP Version 1.7.2 PHP Version 5.3.4 MySQL 5.0.41 Table Type: MyISAM Encoding: UTF-8 Unicode (utf8) Collation: utf8_unicode_ci Basic MySQL "INSERT" query: $startMonth = $date->getMonth(); $startDay = $date->

  • Simple 'SELECT field FROM table_name where TO = "$to"' is returning MySQL error 1064 2011-11-13

    This problem has got me stumped for a few days now. I have a MySQL table that looks like this: +--------+------------+------------+-----------+-----------+-----------+ | id | to | from |question | answer | time | +--------+------------+------------+-

  • Server error MySQL Error - 1064 2012-01-05

    Well not being the best programmer in the land i thought i would ask this question in the hope someone would spot the error or just tell me I am going the wrong way about it. I have a Flash Builder web site that am trying to create a Search function

  • SQL query is correct but still a "SQL error 1064" appears 2012-02-03

    I can't deal with it. I'm experiencing big troubles with this very query: UPDATE books SET books.out = books.out + 1 WHERE id = 81813130; UPDATE books SET books.available = 0 WHERE books.in = books.out; If I run it on my phpMyAdmin, everything's fine

  • MySQL ERROR 1064 (42000) - even with backticks 2012-02-08

    I must be missing something obvious, but still... I get MySQL ERROR 1064 (42000) when I try to run the following: CREATE TABLE `mgr_user` ( `id` INT NOT NULL AUTO_INCREMENT, `customer_id` INT NOT NULL, `username` VARCHAR(25), `password` VARCHAR(100),

  • MySQL 3.23 UNION fails with Error 1064 2012-02-08

    I am trying to use a UNION statement in an old BugZilla MySQL DB running MySQL 3.23. Here is a simplified version of what I am trying to do. It's really nothing exotic but MySQL keeps saying that something is wrong. (select bug_id,rep_platform from b

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.172 (s). 11 q(s)