Single quotes may be in the wrong place? Just a quick guess.

insert into detail(usd,num,date) values('$uid',encode('$str'),'$date')


On 9/27/07, tedd <[EMAIL PROTECTED]> wrote:
> Hi:
>
> What's wrong with the following query?
>
> insert into detail(usd,num,date) values('$uid','encode($str)','$date')
>
> The $str above is a php variable.
>
> The encode($str) doesn't appear to do anything. In the database, an
> entry 1234 shows up as "encode(1234)".
>
> What's the proper syntax for encode()/decode() to work?
>
> Thanks,
>
> tedd
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> _______________________________________________
> New York PHP Community MySQL SIG
> http://lists.nyphp.org/mailman/listinfo/mysql
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>


-- 
the Blog: http://www.utopiaparkway.com
the Karma: http://www.coderswithconscience.com
the Projects: http://flickr.com/photos/[EMAIL PROTECTED]/
the Store: http://astore.amazon.com/httpwwwutopic-20
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to