Re: [PHP-DB] Variable Assignment

2010-10-28 Thread Chris
However, I am totally confused. All the texts state that to set a variable, the code is: $st=100; That's how you do it in php. Doing it in the db is different and depends on the db you are using. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http:

Re: [PHP-DB] Variable Assignment

2010-10-28 Thread Ethan Rosenberg
At 05:13 PM 10/28/2010, Andrés G. Montañez wrote: mysql> SET @st=100; mysql> SELECT @st; +--+ | @st | +--+ | 100 | +--+ Cheers. On 28 October 2010 19:10, Ethan Rosenberg wrote: > Dear List - > > I cannot figure this one out: > > mysql> $st=1000; > ERROR 1064 (42000): You have a

Re: [PHP-DB] Variable Assignment

2010-10-28 Thread Andrés G . Montañez
mysql> SET @st=100; mysql> SELECT @st; +--+ | @st | +--+ | 100 | +--+ Cheers. On 28 October 2010 19:10, Ethan Rosenberg wrote: > Dear List - > > I cannot figure this one out: > > mysql> $st=1000; > ERROR 1064 (42000): You have an error in your SQL syntax; check the manual > that co

[PHP-DB] Re: [[PHP-DB] Variable Assignment]

2001-05-02 Thread Ron Patterson
Assuming this may be MySQL, use a mysql_fetch_object like: $result=mysql_query($sql); $r=mysql_fetch_object($result); echo $r->real_name; Other databases have similar syntax. Hope this helps, Ron Patterson USA.NET "Rankin, Randy" <[EMAIL PROTECTED]> wrote: > All: > > I am new to PHP and was h