Skip to content

Tag: mysql

Error #1064 in creating function in MySQL

friends. I am trying to create function in MySQL using this script: CREATE FUNCTION CurrentMemoDepartment(MID INT) RETURNS INT BEGIN DECLARE DeptID INT; SET DeptID = 0; SELECT TOP 1 TDeptID INTO …

Add Year to NOW()

I am trying to add a year to a date going into a SQL database from PHP. I have tried DATEADD(Year,1,NOW()) And various other forms but can’t seem to get it to add a year onto it in SQL. <?php …