Re: INSER INTO not working!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, take into consideration that in Postgresql you have to quote
table name if there are capitals in the name. Thus, if the table name is
REV then you have to quote it like:

$sqlstring = "INSERT INTO \"REV\" (revision) VALUES ($revision)";

Aurel


On Thu, 2005-05-12 at 11:09 +0300, Mihai Frisan wrote:
> Hi,
> 
> try $sqlstring = "INSERT INTO REV (revision) VALUES ($revision)";
> 
> Mihai
> 
> MIGUEL ANTONIO GUIRAO AGUILAR wrote:
> 
> >Hi list,
> >
> >I'm trying to store a data into a two-column table (id, revision).
> >ID is auto_increment. My table is called REV. I'm using this query:
> >
> >$sqlstring = "INSERT INTO REV VALUES('',$revision)";
> >
> >Using that same query in mysql command line works pretty good and the row is added to the table, but is not working from my PHP page.
> >
> >I echo the $sqlstring variable for troubleshooting and it is correct.
> >
> >I'm using mysql_query($sqlstring, $link);
> >
> >Any ideas??
> >
> >--------------------------
> >MIGUEL GUIRAO AGUILERA
> >
> >  
> >

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux