Re: [PHP-DB] Targeting frame in PHP

2001-04-06 Thread Renze Munnik

Bartek Pawlik wrote:
 
 Hi,
 I have two frames, say TOP, BOTTOM. In TOP frame I have a PHP script, and two 
buttons (must be). What I want is:
 BUTTON1 - after pressing, reload TOP frame
 BUTTON2 - after pressing, update BOTTOM frame, but it must pass variables entered by 
user in form in TOP frame to BOTTOM frame, and in addition BUTTON2 can't have effect 
on TOP frame.
 
 Please, if you have some sugesstion, help me
 
 Bartek Pawlik
 Poland
 
 --
 

This is not a thing for PHP. You should use JavaScript for this.
-- 

* RzE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Targeting frame in PHP

2001-04-06 Thread Steve Brett

have a look at target=

Steve Brett 
Internal Development 
EMIS Ltd. 

"Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message."

Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



 -Original Message-
 From: Renze Munnik [mailto:[EMAIL PROTECTED]]
 Sent: 06 April 2001 08:16
 To: [EMAIL PROTECTED]; Bartek Pawlik
 Subject: Re: [PHP-DB] Targeting frame in PHP
 
 
 Bartek Pawlik wrote:
  
  Hi,
  I have two frames, say TOP, BOTTOM. In TOP frame I have a 
 PHP script, and two buttons (must be). What I want is:
  BUTTON1 - after pressing, reload TOP frame
  BUTTON2 - after pressing, update BOTTOM frame, but it must 
 pass variables entered by user in form in TOP frame to BOTTOM 
 frame, and in addition BUTTON2 can't have effect on TOP frame.
  
  Please, if you have some sugesstion, help me
  
  Bartek Pawlik
  Poland
  
  --
  
 
 This is not a thing for PHP. You should use JavaScript for this.
 -- 
 
 * RzE:
 
 ***
 **  Renze Munnik
 **
 **  E: [EMAIL PROTECTED]
 **  M: +31 6 218 111 43
 ***
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Timestamps VS Date/Time Types

2001-04-06 Thread Jordan Elver

Hi,
I'm getting a bit confused about what date types to use in my applications 
and MySQL db.

I have used timestamps and I know how to format them, convert them and 
compare them etc but now I am about to build a calender type script and I'm 
not sure what to use. For example, if I insert a load of calender 
appointments into the table, how would I sleect all the events in a certain 
month (if the dates were timestamps) ? 

What are the advantages of timestamps over other date//time fileds and vice 
versa?

Thanks for any help,

Cheers,

Jord

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] error code = -504 Cursor unknow

2001-04-06 Thread Mauricio Junqueira

Mauricio Junqueira wrote:

 Mauricio Junqueira wrote:
 
 
 Hello, this is my first attempt to query and print a result coming from a
 database, in this case interbase6.
 
 I got the following error: InterBase: Dynamic SQL Error SQL error code =
 -504 Cursor unknown in maingeral.htm on line 8
 
 Here's the code:
 ? include("php/header.php");
  
  ibase_pconnect(BANCO,DBUSER,DBPASSWD)
 or die ("script language='javaScript' alert('" . ibase_errmsg() .
 "'); /script");
  
   $stmt = "select count(*) from soldcars";
   $query= ibase_query($stmt) or die ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $result   = ibase_fetch_row($query);// THIS IS LINE 8
   $TOTSOLD  = $result;
   ibase_free_result($query);
  
   $stmt="select Total from monthsold";
   $query   = ibase_query($stmt) or die ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $result  = ibase_fetch_row($query);
   $TOTMONTH = $result[0];
   ibase_free_result($query);
  
   $stmt= "select count(*) from deal where available = 1";
   $query   = ibase_query($stmt) or die ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $result  = ibase_fetch_row($query);
   $TOTAVAIL= $result[0];
   ibase_free_result($query);
  
   ibase_commit();
   ibase_close();
 ?


Missed piece: $dbh = ibase_pconnect(BANCO,DBUSER,DBPASSWD) 
 and  $query=ibase_query($dbh,$stmt) or die .





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] using LIMIT

2001-04-06 Thread Sharmad Naik

Hi,
Thanks for firstly helping me out with the prevoius query.
I have a database with mem_id(int) and name(text) as its fields.
In the first form (HTML) ,I take mem_id,name and count(used for LIMIT)
from the browser.

In the second query i write a query whereby i say
$result=pg_Exec($database,"SELECT mem_id,name from search LIMIT $count");
Now here i display the the first 10(say $count=10) records.
Now I know to display the other records i can say   
$result=pg_Exec($database,"SELECT mem_id,name from search LIMIT $count,$count");
but what condition to give to display pages of more than $count records
i.e how do i give for next  existing page.

-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] IBM DB2 connectction problems

2001-04-06 Thread Dan Scott

I think it's more likely that you haven't sourced the 
/home/db2inst1/sqllib/db2profile script in whatever wrapper script starts 
up Apache for you. Add the following line to the top of 'apachectl' or 
'/etc/rc.d/init.d/httpd' to set up the DB2 environment variable before you 
start your webserver:

. /home/db2inst1/sqllib/db2profile

Dan

ManieQ wrote:

 OK, here are some important details about my system:
 
 1. Linux (Mandrake 7.2)
 2. Apache 1.3.14 (from distribution)
 3. jre118 (rpm, IBM version)
 4. IBM DB2 V7.1
Installed with default logins, directories, etc.
 5. Added '/usr/IBMdb2/V7.1/lib' to '/etc/ld.so.conf'; 'ldconfig' executed
 6. PHP 4.0.3pl1
From source rpm, but compiled manually (not rpm build).
I used '--with-ibm-db2' option and also some others like
 '--with-apxs --with-ldap' etc.
 7. Modified apache conf to use PHP.
 
 I'm sure libdb2.so is used, because when I remove (5) line from
 'ld.so.conf' I cannot start apache (missed library). Also tried
 '/home/db2inst1/sqllib/lib'
 - no result. Tried to start apache as db2inst1 user (http.conf - User)  -
 still
 nothing.
 
 So, I still think about DB2 version incompatibilities.
 
 
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] insert binary file into MSSQL

2001-04-06 Thread Marcel Liberda

Anybody got a sample script for store/retrieve binary data (images, wav
files, mp3) to/from a MSSQL database (7.0)?





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] msql_numrows HELP please !!!

2001-04-06 Thread Bigbosss

Hi, 

I'm  a beginner in PHP dev, and i have find how to connect a DB and select a TABLE. 
But i search a example to ahve the numbre of ligne in a rows on my table.

my table is :

date
author
subject
contents



i want to print each rows with HTML tag like this :

dateauthor
subject
contents


can u help me please ??   thx



[PHP-DB] [BUG] Associative arrays and Postgresql

2001-04-06 Thread Patrick Dunford

I wrote in another thread about having problems when storing data from a 
pgsql query into associative arrays using pg_fetch_array.

In order to further test this behaviour I wrote my own pgFetchArray function 
to work basically the same way. This is the code:

function pgFetchArray($rsid,$rownum)
{
$fldcount = pg_numfields($rsid);
for ($fld=0;$fld$fldcount;$fld++)
{
$fldname = pg_fieldname($rsid,$fld);
$flddata = pg_result($rsid,$rownum,$fld);
echo "row=$rownum fld=$fld fldname=$fldname 
value=$flddataBR";
$dArray[$fldname] = $flddata;
$dArray[$fld] = $flddata;
}
while (list ($key, $val) = each ($dArray)) 
echo "$key=$val ";
echo "BR";
return $dArray;
}

Here is one record from the query:

row=0 fld=0 fldname=scheduleid value=27
row=0 fld=1 fldname=displaytext value=M10V PMT
row=0 fld=2 fldname=descriptext value=Mitre 10 Visa Payment Due
row=0 fld=3 fldname=url 
value=https://sec.westpactrust.co.nz/servlet/Banking?xtr=Logon
row=0 fld=4 fldname=current value=t
row=0 fld=5 fldname=reminder value=f
row=0 fld=6 fldname=hideinsummary value=
row=0 fld=7 fldname=occurrid value=35
row=0 fld=8 fldname=scheduleid value=27
row=0 fld=9 fldname=occurdate value=26/12/2000
row=0 fld=10 fldname=starttime value=00:00:00
row=0 fld=11 fldname=endtime value=00:00:00
row=0 fld=12 fldname=allday value=t
row=0 fld=13 fldname=importance value=3
row=0 fld=14 fldname=repeats value=
row=0 fld=15 fldname=descriptext value=
row=0 fld=16 fldname=url value=
scheduleid=27 0=27 displaytext=M10V PMT 1=M10V PMT descriptext= 2=Mitre 10 
Visa Payment Due url= 
3=https://sec.westpactrust.co.nz/servlet/Banking?xtr=Logon current=t 4=t 
reminder=f 5=f hideinsummary= 6= occurrid=35 7=35 8=27 occurdate=26/12/2000 
9=26/12/2000 starttime=00:00:00 10=00:00:00 endtime=00:00:00 11=00:00:00 
allday=t 12=t importance=3 13=3 repeats= 14= 15= 16= 

The interesting point is that fields 15 and 16 are given names by Postgres 
that include underscores (because the same field name occurs in both tables 
of the query). Yet when PHP gets the field names the _1 etc have been 
removed. Perhaps there is a problem with confusion of the names of the 
fields. I will try rewriting my query.

-- 
===
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   Do not be anxious about anything, but in everything, by prayer
and petition, with thanksgiving, present your requests to God.
-- Philippians 4:6
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010406
===
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Header() order

2001-04-06 Thread Lisa Elita

Hi all,

Do you know the header() order?
For example: header("Set-Cookie") should come before/after
header("Location")?
Cause IE seems to be sensitive about this.

Thanks,
Lisa E.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Header() order

2001-04-06 Thread Boget, Chris

 Do you know the header() order?
 For example: header("Set-Cookie") should come before/after
 header("Location")?
 Cause IE seems to be sensitive about this.

Cookies need to come first.

Chris



RE: [PHP-DB] oracle and php

2001-04-06 Thread Brian S. Dunworth

At 09:05 AM 4/6/01 -0500, Brian.J.Mauter wrote:
If you're using Linux or Unix, then you're going to have to compile Oracle 
into PHP.

   right...

This is quite troublesome.

   not really.

For this to work, you first must install Oracle8i (maybe just the client 
will work?).

   Yes, you may install only the client Net8 client on the 
webserver.  ..but you also must configure it so that it can reach your 
Oracle database (presumably on a different server).  Here, I've got 
Apache/PHP and the Oracle Net8 client installed on a Linux box.  The 
database is installed on a huge Sun box.


This also requires a specific version of the Java Runtime Environment 
(available at www.blackdown.com for Linux).

   Could you explain this?  I don't recall having to install any specific 
Java Runtime Environment on our Linux box...

After that, on your ./configure line, you need the option
  --with-oci=/usr/local/Oracle/ or wherever you installed
Oracle.

   or, more specifically, the ORACLE_HOME directory.  Quite likely, it's 
more apt to be --with-oci=/home/oracle/OraHome1/

Brian Mauter
[EMAIL PROTECTED]

   Roll Tide!

- Brian

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
[EMAIL PROTECTED]
  -


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] html examples for display of database

2001-04-06 Thread Marvin Horst

I'm looking for some html example code for displaying database records and
navigation. My html code is functional but rather plain, like phpMyAdmin :-)

A graphically challenged programmer!



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] msql_numrows HELP please !!!

2001-04-06 Thread Johannes Janson

Hi,

?php

$dbhost = "yourhost";
$dbuser = "youruser";
$dbpass = "yourpassword";
$dbname = "name_of_DB";

$connection = mysql_connect("$dbhost, $dbuser, $dbpass") or die ("can't
connect");
$database = myslq_select_db($dbname) or die ("can't select DB");

$result = mysql_query("SELECT * FROM yourtable");

while (list($date, $author, $subject, $contents) = mysql_fetch_row($result))
{

code to display the stuff you want referencing to the vars with the
given
vars in the list(...)

}

Johannes

""Bigbosss"" [EMAIL PROTECTED] schrieb im Newsbeitrag
9aket9$i1t$[EMAIL PROTECTED]">news:9aket9$i1t$[EMAIL PROTECTED]...
Hi,

I'm  a beginner in PHP dev, and i have find how to connect a DB and select a
TABLE. But i search a example to ahve the numbre of ligne in a rows on my
table.

my table is :

date
author
subject
contents



i want to print each rows with HTML tag like this :

dateauthor
subject
contents


can u help me please ??   thx




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] connecting to sybase

2001-04-06 Thread shaun

Fiesta
does anybody know how to connect to a sybase database thats using the
adaptive server anywere driver???

i tried

$hostname =  "host";
$username =  "user";
$password =  "pass";
$dbName =  "database name";
$table = "table name";
Sybase_CONNECT($hostname, $username, $password) OR DIE( "Unable to connect
to database");
any insight would help
please email me anything you have that could help me

[EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Error in non existing line

2001-04-06 Thread Dan Guja

Parse error: parse error in /home/httpd/.../htdocs/index.php on line 90

And I have just 89 lines

Here are the  last linse from index.html:
?php
if ($verify ==7){
$connection = mysql_connect("localhost", "user", "password")
or die("Cannot connect");
$db = mysql_select_db("rating" , $connection);
$sql = " update tb 
 set rating=rating+$rating 
 where image='$arr_Images[$randID]';
$sql_result= mysql_query($sql , $connection);
mysql_close($connection);
 }
?
/body
/html



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Error in non existing line

2001-04-06 Thread kuk

Hello, Dan

You did not close { } statement.

DG Parse error: parse error in /home/httpd/.../htdocs/index.php on line 90

DG And I have just 89 lines

DG Here are the  last linse from index.html:
DG ?php
DG if ($verify ==7){
DG $connection = mysql_connect("localhost", "user", "password")
DG or die("Cannot connect");
DG $db = mysql_select_db("rating" , $connection);
DG $sql = " update tb 
DG  set rating=rating+$rating 
DG  where image='$arr_Images[$randID]';
DG $sql_result= mysql_query($sql , $connection);
DG mysql_close($connection);
DG  }
?
DG /body
DG /html


-- 
Alexander mailto:[EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Error in non existing line

2001-04-06 Thread Julio Cuz, Jr.

Dan,

I think you're missing the end quotes (")  here:

...
 where image='$arr_Images[$randID]'  "  ;
...

At 10:57 PM 4/6/2001 +0300, Dan Guja wrote:
Parse error: parse error in /home/httpd/.../htdocs/index.php on line 90

And I have just 89 lines

Here are the  last linse from index.html:
?php
if ($verify ==7){
$connection = mysql_connect("localhost", "user", "password")
 or die("Cannot connect");
$db = mysql_select_db("rating" , $connection);
$sql = " update tb
  set rating=rating+$rating
  where image='$arr_Images[$randID]';
$sql_result= mysql_query($sql , $connection);
mysql_close($connection);
  }
?
/body
/html



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Julio Cuz, Jr.
Riverside Community College
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Code bombs connecting to MSSQL 7

2001-04-06 Thread John A DAVIS

THE SQL STATEMENT:
$data = odbc_do($connection, "Select Distinct [ActivityStatus], 
[WaterSystemStateCode], [WaterSystemName], [PopulationServed], [SeasonBegins], 
[SeasonEnds], [SystemType], Contact, Phone, County, Connections, Address, CityStateZip 
 From viewInventory Where [WaterSystemStateCode]=\"OR4100100\"");BOMBS HERE

THE ERROR:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 
'OR4100100'., SQL state S0022 in SQLExecDirect in C:/Program Files/Apache13 
14/Apache/htdocs/sdwis/inventry.php3 on line 21


VERIFICATION:
the field value "OR4100100" exists in the table TINWSYS in the "Number0" column(alias: 
"WaterSystemStateCode"). The same query works in Access linked to the MSSQL 7 server. 
. .

THIS WORKS:
$data = odbc_do($connection,"Select * From viewInventory");


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] insert binary file into MSSQL

2001-04-06 Thread Phil Jackson

Hi,
Check out
http://www.zdnet.com/devhead/stories/articles/0,4413,2643888,00.html
for a good workable example of using PHP/MySql to do this - the principles
should
be the same.

Also, search www.asptoday.com for the word "blob" to find some good articles

on the topic.

Phil J.


Marcel Liberda wrote:

 Anybody got a sample script for store/retrieve binary data (images, wav
 files, mp3) to/from a MSSQL database (7.0)?

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PostgreSQL versus MySQL

2001-04-06 Thread The Hermit Hacker


Check out:

http://openacs.org/philosophy/why-not-mysql.html

and:

http://www.phpbuilder.com/columns/tim20001112.php3

On Fri, 6 Apr 2001, Matt Braynard wrote:

 Can someone outline the differences between the two? I am partial to MySQL
 from experience but want to get a good view of why one is better than the
 other.

 Also, I've heard that you will lose data with MySQL if a system failure
 should occur.

 Thanks.

 Matt


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



Marc G. Fournier   ICQ#7615664   IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: [EMAIL PROTECTED]   secondary: scrappy@{freebsd|postgresql}.org


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Code bombs connecting to MSSQL 7

2001-04-06 Thread Andrew Hill

John,

The quotes are throwing it.  Try single or no quotes.

Best regards,
Andrew
---
Andrew Hill - Director Technology Evangelism
OpenLink Software - http://www.openlinksw.com
Internet Data Integration Technology



On 4/6/01 4:30 PM, "John A DAVIS" [EMAIL PROTECTED] wrote:

 THE SQL STATEMENT:
 $data = odbc_do($connection, "Select Distinct [ActivityStatus],
 [WaterSystemStateCode], [WaterSystemName], [PopulationServed], [SeasonBegins],
 [SeasonEnds], [SystemType], Contact, Phone, County, Connections, Address,
 CityStateZip  From viewInventory Where [WaterSystemStateCode]=\"OR4100100\"");
 BOMBS HERE
 
 THE ERROR:
 Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
 column name 'OR4100100'., SQL state S0022 in SQLExecDirect in C:/Program
 Files/Apache13 14/Apache/htdocs/sdwis/inventry.php3 on line 21
 
 
 VERIFICATION:
 the field value "OR4100100" exists in the table TINWSYS in the "Number0"
 column(alias: "WaterSystemStateCode"). The same query works in Access linked
 to the MSSQL 7 server. . .
 
 THIS WORKS:
 $data = odbc_do($connection,"Select * From viewInventory");
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]