Re: Weird problems running scripts on different platforms.

From: Date: Thu, 16 Nov 2000 17:25:26 +0000
Subject: Re: Weird problems running scripts on different platforms.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25733@lists.php.net to get a copy of this message
Why do you have a ; after the ) in the query? At a casual glance, I can't see how it would run on either platform. Or did I miss something... ? mssql_query("insert into tbl_news (date,time,head,content,urgent) values (\"$datum\",\"$tid\",\"$head\",\"$content\",$urgent);") or die("Invalid Query"); Ivanoff Jari wrote: > Hi! > I have an Apache server running on an NT box as an development server and an > IIS server as an publication server on our Intranet. > I run the same script on both of them, with the same version of PHP ( > 4.0.3pl1) > Both scripts connect to the same MS SQL server and the same database. > When I run it on the Apache server it works great but when i run the same > script ( identical ) on the IIS I get this errormessage: > > Warning: MS SQL message: Line 1: Incorrect syntax near ')'. (severity 15) in > D:\Inetpub\intranet.autonova.se\uddevalla\dev\news\newsin.php on line 9 > Warning: MS SQL: Query failed in > D:\Inetpub\intranet.autonova.se\uddevalla\dev\news\newsin.php on line 9 > Invalid Query > This is the script: > <?php > $db = mssql_connect("seanua02","www","www"); > mssql_select_db("intranet",$db); > $tid = date("H:i:s"); > $dag = date("d"); > $manad = date("m"); > $ar = date("Y"); > $datum="$ar-$manad-$dag"; > mssql_query("insert into tbl_news (date,time,head,content,urgent) values > > (\"$datum\",\"$tid\",\"$head\",\"$content\",$urgent);") > or die("Invalid > Query"); > printf("<a href=\"form.html\">Åter till inmatningen</a> <a > href=\"http://intranet\"> Till > Huvudsidan</a>"); > ?> > > I get the $head,$content and $urgent from a form. $head and $content are > both text and $urgent is a bit value ( 1 or 0 ) from a radiobutton. > I would appreciate any help I can get! > > With My Best Regards / Med Vänlig Hälsning > Jari Ivanoff > IS/IT > Volvo Cars Uddevalla > Phone/Tel: +46-(0)522-80671 > Fax: +46-(0)522-80427 > Pbx/Växel: +46-(0)522-80000 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- ========================== Michael Kimsal http://www.tapinternet.com PHP Training courses http://www.tapinternet.com/php

« previous php.general (#25733) next »