Re: Date math functions...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > mysql("$DBName","UPDATE Balances SET CompEarned=CompTaken+8 WHERE
> > > said='$said'") or die(mysql_error());
> > > mysql("$DBName","INSERT INTO Log VALUES(DATE_ADD($StopDate,
> > > INTERVAL 1 DAY,'',1,2,'$CalendarDetailsID')") or die(mysql_error());

> Actually this is generating another error.  Now, without the single
> quotes I am getting the following error:
>
> Column 'StartDate' cannot be null
>
> It looks like for some reason the DATE_ADD is returning a NULL
> value.  Any more ideas?

Are you sure $StopDate has a value and is in the right format? Echo out your
query to the screen when you get an error, so you can look for obvious
mistakes.

Is this just example code?  You're using a function called mysql(), which
isn't standard.

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux