<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2>When you created your table it appears you created it as
<FONT face="Times New Roman" color=#000000 size=3>FahrtenbuchTabelle, but in
your PHP sql, you don't have the table name quoted, it will take what you have
and insert into a table called fahrtenbuchtabelle. All table names that
are not quoted in sql will be lowercased when passed to the
processor.</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2>To minimize on headache, you really should rename your
table in PostgreSQL to <FONT face="Times New Roman" color=#000000
size=3>fahrtenbuchtabelle. Note that PostgreSQL table names are case
sensitive so FahrtenbuchTabelle and fahrtenbuchtabelle are not the same
name.</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2>Other possibly potential problem, I can't tell how you
are passing in your $datum date, but may need to be quoted.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=945561812-13042007><FONT face=Arial
color=#0000ff size=2>Regina</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Gerald Baumgartner<BR><B>Sent:</B> Friday, April 13, 2007 8:14
AM<BR><B>To:</B> postgis-users@postgis.refractions.net<BR><B>Subject:</B>
[postgis-users] Problems with PHP and PostgreSQL/PostGIS<BR></FONT><BR></DIV>
<DIV></DIV>Hi everyone!<BR><BR>I have created a table and now I want to put a
GPS Logfile into this table with a php file. But the php file doesn't do the
inserts.<BR><BR>Please can someone help me!<BR><BR><BR><SPAN
style="FONT-WEIGHT: bold">The error message from the php file in
firefox:</SPAN><BR><BR><B>Warning</B>: pg_query() [<A
href="http://localhost/GpsDaten/function.pg-query">function.pg-query</A>]: Query
failed: ERROR: relation "fahrtenbuchtabelle" does not exist in
<B>C:\ms4w\Apache\htdocs\GpsDaten\GPS_Daten_einlesen.php</B> on line
<B>103<BR><SPAN style="FONT-WEIGHT: bold"><BR><BR></SPAN>Here are the commands
in the php file</B>:<BR><BR>
if($z_eintraege==2)<BR>
{<BR> $sql_befehl="INSERT INTO
FahrtenbuchTabelle(FID,Date_Start_Fahrt,Date_Insert,Strecke) VALUES
($z_eintraege,$datum,$datum,GeometryFromText('LINESTRING($breitengrad1
$laengengrad1, $breitengrad $laengengrad)',4326))";
<BR>
$res=pg_query($connection,$sql_befehl);<BR>
$sql_befehl_select="SELECT max(FID) as fid from
FahrtenbuchTabelle";<BR>
$fahrtnummer=pg_query($connection,$sql_befehl_select);<BR>
<BR> } <BR>
if($z_eintraege>2)<BR> {<BR>
$sql_befehl_append="UPDATE FahrtenbuchTabelle SET
Strecke=AddPoint(Strecke,GeomFromText('POINT($breitengrad $laengengrad)',4326))
where FID='$fahrtnummer'"; <BR>
$result=pg_query($connection,$sql_befehl_append);<BR>
}<BR><BR><SPAN style="FONT-WEIGHT: bold">And there is my table in
postgresql/postgis:</SPAN><BR><BR>CREATE TABLE
"FahrtenbuchTabelle"<BR>(<BR> "FID" numeric NOT NULL, <BR>
"Date_Start_Fahrt" date NOT NULL,<BR> "Date_Insert" date NOT
NULL,<BR> "Strecke" geometry,<BR> CONSTRAINT "FahrtID" PRIMARY KEY
("FID"),<BR> CONSTRAINT "enforce_dims_Strecke" CHECK (ndims("Strecke") =
2), <BR> CONSTRAINT "enforce_geotype_Strecke" CHECK
(geometrytype("Strecke") = 'LINESTRING'::text OR "Strecke" IS NULL),<BR>
CONSTRAINT "enforce_srid_Strecke" CHECK (srid("Strecke") = 4326) <BR>)
<BR>WITHOUT OIDS;<BR>ALTER TABLE "FahrtenbuchTabelle" OWNER TO
postgres;<BR><BR>Already thankful for any ideas.<BR></BODY></HTML>
<HTML><BODY><P><hr size=1></P><br>
<P><STRONG><br>
The substance of this message, including any attachments, may be<br>
confidential, legally privileged and/or exempt from disclosure<br>
pursuant to Massachusetts law. It is intended solely for the<br>
addressee. If you received this in error, please contact the sender<br>
and delete the material from any computer.<br>
</STRONG></P></BODY></HTML>