cvs: phpweb / cal.php

From: Date: Mon, 28 Jan 2002 21:25:14 +0000
Subject: cvs: phpweb / cal.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-8344@lists.php.net to get a copy of this message
jimw Mon Jan 28 16:25:14 2002 EDT Modified files: /phpweb cal.php Log: fix insert queries. Index: phpweb/cal.php diff -u phpweb/cal.php:1.25 phpweb/cal.php:1.26 --- phpweb/cal.php:1.25 Tue Jan 8 19:48:38 2002 +++ phpweb/cal.php Mon Jan 28 16:25:13 2002 @@ -393,7 +393,7 @@ $err = "Invalid start date - please correct it<br>\n"; $a=1; } else { - mysql_query("insert into phpcal values (0,'$syear-$smonth-$sday',NULL,NULL,'$sdesc','$url','$ldesc',1,0,NULL)") or $err=mysql_error(); + mysql_query("insert into phpcal (id,sdato,edato,recur,sdesc,url,ldesc,tipo,approved,app_by) values (0,'$syear-$smonth-$sday',NULL,NULL,'$sdesc','$url','$ldesc',1,0,NULL)") or $err=mysql_error(); } break; case 'multi': @@ -408,14 +408,14 @@ } elseif($smonth==$emonth && $sday==$eday && $syear==$eyear) { $err = "Your start and end dates are identical - please correct this<br>\n"; $a=1; } else { - mysql_query("insert into phpcal values (0,'$syear-$smonth-$sday','$eyear-$emonth-$eday',NULL,'$sdesc','$url','$ldesc',2,0,NULL)") or $err=mysql_error(); + mysql_query("insert into phpcal (id,sdato,edato,recur,sdesc,url,ldesc,tipo,approved,app_by) values (0,'$syear-$smonth-$sday','$eyear-$emonth-$eday',NULL,'$sdesc','$url','$ldesc',2,0,NULL)") or $err=mysql_error(); } break; case 'recur': if(!is_numeric($recur) || !is_numeric($recur_day)) { $err = "Recurring event sequence is invalid - please correct it<br>\n"; $a=1; } else { - mysql_query("insert into phpcal values (0,NULL,NULL,'$recur:$recur_day','$sdesc','$url','$ldesc',3,0,NULL)") or $err=mysql_error(); + mysql_query("insert into phpcal (id,sdato,edato,recur,sdesc,url,ldesc,tipo,approved,app_by) values (0,NULL,NULL,'$recur:$recur_day','$sdesc','$url','$ldesc',3,0,NULL)") or $err=mysql_error(); } break; }

« previous php.mirrors (#8344) next »