On Thursday 04 March 2004 08:08, Rich Hutchins wrote:

> Oh, and, normally, you reference the variables like so:
$_POST["varname"].
> I typically use the following syntax:
>
> "INSERT INTO tablename
> VALUES('".$_POST["varone"]."','".$_POST["vartwo"]."');

>>IMO it is better to use the braces syntax:
>>"insert into show
>>values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"

I'm not second guessing at all, just curious as to why?  Is it less work on
the parser?
Do you find it cleaner?  I've often used Richard's method myself, for the
color coding that shows
in my editors(Ultraedit and VIM) when concatenating with . , mainly for
readability...but have found myself, of late, using the braces more...

Thanks
Jeff

> In your query you have omitted the quotes. Don't know if that causes
> problems, but echoing out $addtocart would show that anyway.

>>Also ...

> mysql_close();
> $error = mysql_error();

>>call mysql_error() before you close the connection.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
If you give Congress a chance to vote on both sides of an issue, it
will always do it.
                         -- Les Aspin, D., Wisconsin
*/

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

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

Reply via email to