Re: Unknown Table i field list

From: Date: Mon, 11 Oct 2010 23:30:11 +0000
Subject: Re: Unknown Table i field list
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-308643@lists.php.net to get a copy of this message
Ashley I have used the concatenation before and I believe that since I closed the INSERT INTO with a ", I needed to add the ." for the VAULES. My post is laced with typo's, I just came back from an impromtu hosptial stay and they had given me the "good stuff",so I was a little cloudier than usual. Thank you again for trying to help. Gary <ash@ashleysheridan.co.uk> wrote in message news:40.00.07410.A0783BC4@pb1.pair.com...
That's the same query. One thing I did notice (and I wasn't sure if it was a typo as I saw a few in the original post) but you've used a period instead of a comma to separate the values in the query. It shouldn't produce the error you're seeing, but sometimes you never know! Thanks, Ash http://www.ashleysheridan.co.uk ----- Reply message ----- From: "sueandant" <hollandsathome@tiscali.co.uk> Date: Mon, Oct 11, 2010 22:26 Subject: [PHP] Unknown Table i field list To: "Gary" <gpaul@paulgdesigns.com> Cc: "PHP" <php-general@lists.php.net> Have you tried : $query = "INSERT INTO formcom(fname, lname, email, comment, ip) VALUES
('$fname','$lname','$email'.'$comment','$ip')" or die('error in query');
tholland ----- Original Message ----- From: "Gary" <gpaul@paulgdesigns.com> To: <php-general@lists.php.net> Sent: Monday, October 11, 2010 8:09 PM Subject: [PHP] Unknown Table i field list
I am getting an error of "unkown talbe "formcom" in field list". I dont understand this. I have a talbe called formcom in the database, in fact I created this talbe to replace the first one named comments just in case the table name comments was not allowed. I have used this same script a number of time, this is the first time I am getting this error Here is the scritpt $dbc = mysqli_connect('server','username',password','db name') or die('Error connecting to MySQL server'); $query = "INSERT INTO formcom(fname, lname, email, comment, ip)" . "VALUES ('$fname','$lname','$email'.'$comment','$ip')" or die('error in query'); $result = mysqli_query($dbc, $query) or die('Error in Result'); mysqli_close($dbc); I have also tried formcom.fname, formcom.lname, formcomemail, formcomcomment, formcom.ip I have double triple quad checked to make sure I did not have comment and comments mix up. Anyone be able to help me? Thank you Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from ESET Smart Security, version of virus signature database 5521 (20101011) __________ The message was checked by ESET Smart Security. http://www.eset.com

« previous php.general (#308643) next »