CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 CCS: Yucky nastiness with joins and inserts

Print topic Send  topic

Author Message
Jason Charette
Posted: 05/08/2002, 7:22 AM

Hey everyone,

Using PHP4.0.6, Postgres 7.2 on RedHat Linux 7.2.

Okay, so I have created a page that has both a Grid and a Record Form (to
edit the Grid elements).
I have a join occuring on both the Grid and Record forms, to replace some
record ID's with their english equivalents found elsewhere.
Everything works great (including displaying records in the Record Form),
until I try to either update or insert.

It would seem that CCS is attempting to insert or update data within all
tables specified in my join. This strikes me as a very bad thing....

Here's an example of the error I get:

Warning: pg_exec() query failed: ERROR: parser: parse error at or near ","
in c:\inetpub\wwwroot\SAF_CCS\db_pgsql.php on line 76
Database error: Invalid SQL: UPDATE signkeys, signinfo SET
expires='2002-07-24 00:00:00-04', expirytype='ACL', internalkey='t',
company=NULL WHERE signtkeys = '3X82O115V49'
PostgreSQL Error: 1 (ERROR: parser: parse error at or near "," )
Session halted.

Now note that the company field is a string I'm actually pulling out of the
signinfo table and displaying. It should not be part of the update....
Weird.



Has anyone else seen this?

J.


ronb
Posted: 05/08/2002, 11:21 AM

Jason Charette wrote:

> Hey everyone,
>
> Using PHP4.0.6, Postgres 7.2 on RedHat Linux 7.2.
>
> Okay, so I have created a page that has both a Grid and a Record Form (to
> edit the Grid elements).
> I have a join occuring on both the Grid and Record forms, to replace some
> record ID's with their english equivalents found elsewhere.
> Everything works great (including displaying records in the Record Form),
> until I try to either update or insert.
>
> It would seem that CCS is attempting to insert or update data within all
> tables specified in my join. This strikes me as a very bad thing....
>
> Here's an example of the error I get:
>
> Warning: pg_exec() query failed: ERROR: parser: parse error at or near ","
> in c:\inetpub\wwwroot\SAF_CCS\db_pgsql.php on line 76
> Database error: Invalid SQL: UPDATE signkeys, signinfo SET
> expires='2002-07-24 00:00:00-04', expirytype='ACL', internalkey='t',
> company=NULL WHERE signtkeys = '3X82O115V49'
> PostgreSQL Error: 1 (ERROR: parser: parse error at or near "," )
> Session halted.
>
> Now note that the company field is a string I'm actually pulling out of
> the signinfo table and displaying. It should not be part of the update....
> Weird.
>
>
>
> Has anyone else seen this?
>
> J.
Same here. Just look at the sql in the code and you'll see several tables
are used in the insert/update/delete statements just remove the ones you
dont want and everything's fine. I take it they will fix this in the next
release.

RonB
Jason Charette
Posted: 05/08/2002, 11:32 AM

Agreed.

And it's already fixed -- I was more-or-less wondering if it was a
dumb-dumb I did, or something else.

It's always nice when other people have the same issues I do... <g>

J.

"ronb" <r.borkent@123chello.nl> wrote in message
news:abbqak$30u$1@news.codecharge.com...
> Jason Charette wrote:
>
> > Hey everyone,
> >
> > Using PHP4.0.6, Postgres 7.2 on RedHat Linux 7.2.
> >
> > Okay, so I have created a page that has both a Grid and a Record Form
(to
> > edit the Grid elements).
> > I have a join occuring on both the Grid and Record forms, to replace
some
> > record ID's with their english equivalents found elsewhere.
> > Everything works great (including displaying records in the Record
Form),
> > until I try to either update or insert.
> >
> > It would seem that CCS is attempting to insert or update data within all
> > tables specified in my join. This strikes me as a very bad thing....
> >
> > Here's an example of the error I get:
> >
> > Warning: pg_exec() query failed: ERROR: parser: parse error at or near
","
> > in c:\inetpub\wwwroot\SAF_CCS\db_pgsql.php on line 76
> > Database error: Invalid SQL: UPDATE signkeys, signinfo SET
> > expires='2002-07-24 00:00:00-04', expirytype='ACL', internalkey='t',
> > company=NULL WHERE signtkeys = '3X82O115V49'
> > PostgreSQL Error: 1 (ERROR: parser: parse error at or near "," )
> > Session halted.
> >
> > Now note that the company field is a string I'm actually pulling out of
> > the signinfo table and displaying. It should not be part of the
update....
> > Weird.
> >
> >
> >
> > Has anyone else seen this?
> >
> > J.
> Same here. Just look at the sql in the code and you'll see several tables
> are used in the insert/update/delete statements just remove the ones you
> dont want and everything's fine. I take it they will fix this in the next
> release.
>
> RonB


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.