[PHP-DB] Using MyODBC V 2.50.39.00

2002-04-01 Thread Peter J. Krawetzky

I found a note on the MySQL website that MyODBC has a limitation in the
number of columns that it returns.  Is this true?

I am successfully connecting to a MySQL database but I keep getting the
error:
Warning: Field index is larger than the number of fields in (program-name)
on line 78.

I am running MySQL and Apache on a Win98 machine.  I don't want to using
mysql_ commands to the database because I don't want to make this specific
to MySQL.  I want generic code using ODBC.  Is there a way around this?  Why
would anybody put this type of limitation in?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Using PHP with filemaker?

2001-09-10 Thread Peter J. Krawetzky

You need an odbc driver in order to communicate with a database.  I am not
familiar with filemaker so I suggest you contact your vendor or go to their
website and see if they have an odbc driver.
- Original Message -
From: "joel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 11:14 AM
Subject: [PHP-DB] Using PHP with filemaker?


> I am trying to get php to write the data stored in some variables directly
> to a filemaker pro 5.5 database. So far I have got the PHP to write to a
> .txt file as tab delineated text, but I then have to manually import this
> data into filemaker.
>
> I have not been able to find any specific function for editing filemaker
> databases using PHP...
> But the php.net manual states:
>
> "Chapter 29. Connecting to databases
>
> This section holds common questions about relation between PHP and
databases
> : Yes, PHP can acces virtually any database available today. "
> http://www.php.net/manual/en/faq.databases.php
>
>
> Has anyone been able to do this? Or could you point me in the right
> direction for some tutorials or assistance.
>
> Joel Mills
> Newcastle College
>
>
> --
> 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] store an array in a mysqldb

2001-08-31 Thread Peter J. Krawetzky

If you are setting up a true relational database, arrays would be stored in
a seperate table with a unique key.  Each part of the array would be a
seperate row.  This is called normalization.  If you are doing it for fun,
then you could place some type of seperator (like a comma, semicolon, etc)
between each array field.

Here is an example:
FATHER TABLE:
COLUMNS:FIRST_NAME
LAST_NAME
AGE

A father can have many children which would be your array.  An Array is
really a repeating group of information.
CHILD TABLE:
COLUMNS:FATHER_FIRST_NAME
FATHER_LAST_NAME
CHILD_FIRST_NAME
CHILD_LAST_NAME
CHILD_TITLE

Your tables could have the following information:
FATHER TABLE:
FIRST_NAME  LAST_NAME   AGE
johndoe 39
sam green   44

CHILD TABLE:
FATHER_FIRST_NAME   FATHER_LAST_NAMECHILD_FIRST_NAME   
 CHILD_LAST_NAME TITLE
johndoe robert  doe
 [spaces]
johndoe jennifer   
 doe [spaces]
johndoe sam
 doe [spaces]
sam green   sam
 green   jr
sam green   kelly  
 green   [spaces]

The index on the child table would be every column to make it unique.  If
you want to select each child for john doe, your query would look like this:
select child_first_name,child_last_name_title from child where
father_frist_name = 'john' and father_last_name = 'doe';

This is a very simiplified example.  You would need to taylor it for your
own needs.

-Original Message-
From: Jeroen van Bussel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 10:43
To: [EMAIL PROTECTED]
Subject: [PHP-DB] store an array in a mysqldb


I would like to know if it is somehow possible to store an array in a mysql
DB.

Could somebody please help me.

greetz Jeroen



--
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] Problems with update und delete's

2001-07-27 Thread Peter J. Krawetzky

How many rows are in the table?  Is the "id" column indexed?  It looks like
it's scanning through each row to find a match.  How long does it take to
delete just the one row?  If it's 2 seconds, then that delete is acting the
same way.

If you have a very small table, then it sounds like the database is swapping
out to disk for each delete thus increasing your response time.  You need to
look at how much cache is available and the amount of memory on your server.
-Original Message-
From: Uli <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, July 27, 2001 10:28 AM
Subject: [PHP-DB] Problems with update und delete's


>Hallo!
>
>Maybe you can help me with my problems.
>
>I have a html form that deletes (or updates) over a php-script datas from
my
>database like "delete from table_name where id=xy"
>
>and it works correctly.
>
>But when I have about 100 entries in my database then it takes about 50
sec.
>to delete an entry.
>
>Do you know what it can be
>
>Please send replies to this newsgroup or to [EMAIL PROTECTED]
>
>Thanx a lot.
>
>Uli
>
>
>
>--
>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] Not Really A DB Question

2001-07-27 Thread Peter J. Krawetzky

How do you loop through all the text objects in a PHP script?  In otherwords, I want 
use logic to check the value of each textbox without specifically referencing the 
actual object name.  Visual Basic has this type of logic.



Re: [PHP-DB] 'ORA-12203: TNS:unable to connect to destination' error

2001-07-20 Thread Peter J. Krawetzky

This is saying that your request to connect to Oracle via php and apache is
failing because it cannot find the tnsnames.ora file.  Is apache setup
correctly to access Oracle?

Also, if you want detailed information on an error message from Oracle,
logon to the Oracle server with owner id of oracle and type in oerr ora
12154.  This works for any Oracle error message.
-Original Message-
From: Barry Prentiss <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, July 20, 2001 2:02 PM
Subject: Re: [PHP-DB] 'ORA-12203: TNS:unable to connect to destination'
error


>Thx Stathis,
> I get the same response as before:
> Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
in
>c:\program files\apache group\apache\htdocs\dna\dna_oci_sys_list.php on
line
>20
> Anything else I can try?
> Barry
>
>"Rouvas Stathis" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>> Barry Prentiss wrote:
>> >
>> > Hi All,
>> >  I finally got past the php_oci8.dll problem by moving it to the same
>> > directory as php.exe and changing the php.ini extensions_dir back to
>'./'.
>> >
>> >  Now I am getting the following error:
>> >
>> >Warning: _oci_open_server: ORA-12203: TNS:unable to connect to
>> > destination in c:\program files\apache
>> > group\apache\htdocs\dna\dna_oci_sys_list.php on line 20
>> >
>> > which occurs at the $conn line below:
>> >
>> >  error_reporting (E_ALL);
>> >  putenv('ORACLE_HOME=C:\orant');
>> >  putenv('TNS_ADMIN=C:\orant\NET80\ADMIN');
>> >  putenv('ORACLE_SID=SLAC');
>> >  putenv('TWO_TASK=SLAC_TCP');
>> >
>> >  $conn = ociLogon("user","password");
>>
>> Try, OciLogon("user","pass",'SLAC'). What do you get?
>>
>> -Stathis.
>>
>> >
>> > This implies that I am reaching the Net8 oci client libraries (right?).
>> >
>> > My environment: PHP 4.0.5, Apache 1.3.19, W2K, Net8 8.0.6.0.0, remote
>Oracle
>> > 8.1.6 on Solaris.
>> >
>> > I can connect through SQL*Plus, tests OK through Net8 assistant,
>> > tnsnames.ora is in proper place (as defined in TNS_ADMIN above).
>> >
>> > What am I doing wrong?
>> >  Thx in advance,
>> >  Barry Prentiss
>
>
>
>--
>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] Persistent connection: Yes or Not?

2001-07-20 Thread Peter J. Krawetzky

This is only a guess but for Windows 2000, is there a file in your oracle
directory called init.ora?  The x's would be the instance name.  You
might have a maximum number of users defined in that file which is limiting
your persistent connections.  Check license max users (license_max_users)
and license max sessions (license_max_sessions).  You can also set license
session warning (license_sessions_warning) which will give you a warning
message when the number of connections is reached before a failure message
is generated.  If you dont' have this file, then check your oracle.reg file.

In actuality, Oracle should not crash when it hits the max users.  It should
only return an error message.  You might want to open up a problem report
with Oracle or search their site for possible fixes.

I haven't dealt with Windows 2000.  My experience is with Solaris so I'm not
sure if the setup is the same.  I assume it is.

Good luck!

-Original Message-
From: Ventsyslav Vassilev <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, July 20, 2001 3:55 AM
Subject: [PHP-DB] Persistent connection: Yes or Not?


>Recently i have faced the following issue:
>I have a site running Apache 1.3.19 under Windows 2000 pro/PHP
4.0.6./Oracle
>8i
>After a little load Apache crashes with ORA-00020 error - maximum number of
>Ora connections exceeded. This problem seems to be faced very often by
other
>people. Limit in ora.reg is 50, but the other told me that even value of
300
>does not resolve the issue.
>After i started  to use OCILogon() function instead of OCIPLogon() the
>problem was solved and the site speed is not affected in any way.
>But is this the correct way or...?
>
>
>--
>
>Ventsyslav Vassilev
>Comel Soft Multimedia
>Sofia, Bulgaria
>ICQ UIN: 11199819
>e-mail: [EMAIL PROTECTED]
>Visit http://www.comelsoft.com
>
>
>
>--
>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] Re: enum !!

2001-07-17 Thread Peter J. Krawetzky

Your first statement will not work.  It is the same thing as saying select *
from test where cat = 'c'.  You need to use the % in order to find all rows
which may contain 'c'.
-Original Message-
From: Miles Thompson <[EMAIL PROTECTED]>
To: McShen <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Monday, July 16, 2001 3:40 PM
Subject: Re: [PHP-DB] Re: enum !!


>
>select * from test where cat like 'c'
>
>or, a little broader
>
>select  *from text where cat like '%c%'
>
>Miles Thompson
>
>At 02:56 PM 7/16/01 -0400, McShen wrote:
>>ok. I use set to make a table. here is my table 'test'
>>+---+--+
>>| name  | cat  |
>>+---+--+
>>| shen  | a,c  |
>>| shen1 | b,c  |
>>+---+--+
>>
>>How can I find all records that contain 'c'?
>>i tried
>>select * from test where cat='c';
>>
>>it returned "empty set";
>>
>>please help
>>
>>
>>"Tom Hodder" <[EMAIL PROTECTED]> wrote in message
>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> >
>> > First normal form (1NF), A table in which the intersection of every
column
>> > and record contains one, and only one, value.
>> >
>> >
>> >
>> > -Original Message-
>> > From: Hugh Bothwell [mailto:[EMAIL PROTECTED]]
>> > Sent: 16 July 2001 19:21
>> > To: [EMAIL PROTECTED]
>> > Subject: [PHP-DB] Re: enum !!
>> >
>> >
>> >
>> > "McShen" <[EMAIL PROTECTED]> wrote in message
>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > > how do i store multiple data in one field?
>> > > i have a table like this
>> > >
>> > > +---+---+--+-+-+---+
>> > > | Field | Type  | Null | Key | Default | Extra |
>> > > +---+---+--+-+-+---+
>> > > | test  | enum('a','b','c') | YES  | | NULL|   |
>> > > +---+---+--+-+-+---+
>> > >
>> > > insert into test values('a','b','c');  doens't work. please help
>> >
>> > Your query is mixed up; 'test' is the field name, not the table name,
and
>>I
>> > think you want to put the values into three separate records, not
one...
>> >
>> > Try
>> > INSERT INTO tablename ( test ) VALUES ( 'a' ), ( 'b'), ('c'), ('');
>> >
>> > This should get you four records, with 'test' values of a, b, c, and
null.
>> >
>> > If you want to store more than one value in the same record, you should
be
>> > looking at sets, not enums.
>> >
>> >
>> >
>> > --
>> > 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 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] How to drop a table when user leaves prematurely?

2001-07-17 Thread Peter J. Krawetzky

What I would do is issue the create table statement and check for a return
code that say it already exists.  If it does, drop it then create it.  If it
doesn't exist, then it will be created and your application continues.

Don't bother writing a query to see if it exists and then perform an action
(drop/create or create).  That is an inefficient use of resources and a
waste of code.

-Original Message-
From: BD <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Sunday, July 15, 2001 11:25 PM
Subject: [PHP-DB] How to drop a table when user leaves prematurely?


Ugh!

I'm sure this is fairly simple, but I have yet to come up with a way to do
it...

In a nutshell, our application creates, uses and drops a table while the
user is working on the site. Unfortunately, because of "other
considerations", we can't use a defined temp table - it has to be created as
a regular table. We have a routine in the app that will drop the table once
the user is done with their work, but if they leave for some reason before
they're done, the table is left hanging out there. This wasn't a problem at
first, but we're building up quite a collection of useless tables right now.

Is there any way to drop the table automagically when the user leaves
prematurely, either by closing their browser or jumping to another site? I
tried using register_shutdown_function(), but it didn't seem to have any
effect...

I think, and I know I may be way off base, is that there are a lot of pages
involved in this application, and I'm not sure how to tell the app that the
user is just going from one page to the next or is actually going bye-bye...

-BD-


http://www.bustdustr.net
http://www.rfbdproductions.com
The Entertainment Center
Home Of Radio Free BD
For A Difference.





-- 
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] MySQL Question

2001-04-17 Thread Peter J. Krawetzky

How do you move the database files to another location in MySQL?  I am
running Redhat 7.1 with MySQL version 3.23.33.


-- 
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] Multiple rows for one column in a MySQL table?

2001-03-27 Thread Peter J. Krawetzky

Even if you normalize your database design, you must still tell it who owns
the row.  For example, you have a table containing the following columns:
id name

You have another table that contains the phone numbers:
idnamephone number

In order to connect the rows via a foreign key, you must have the
information in the first table and again in the second table.  Normalization
only seperates repetative data.  If you didn't normalize, your first table
would look something like this:
idnamephone number 1phone number 2phone number 3 (etc,
etc, etc).

Peter J. Krawetzky
-Original Message-
From: Cal Evans <[EMAIL PROTECTED]>
To: Kevin Connolly <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Tuesday, March 27, 2001 12:26 PM
Subject: RE: [PHP-DB] Multiple rows for one column in a MySQL table?


>No. You need to look at normalizing your database if you have this
>situation.
>
>Cal
>http://www.calevans.com
>
>
>-Original Message-
>From: Kevin Connolly [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, March 27, 2001 10:48 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Multiple rows for one column in a MySQL table?
>
>
>Hi,
>Is it possible to have multiple rows for one column of a MySQL databes? and
>if so how would I insert another row into the column in question?
>
>eg:
>
>idNamePhone Number
>1Kev   123123
>
>2John  234234
>  345345
>
>3   Paul   789789
>
>Thanks,
>Kev.
>
>
>--
>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] ORA-12154: TNS:could not resolve service name in XXX

2001-02-22 Thread Peter J. Krawetzky

If you ftp'ed your file as binary, then the CRLF would not work correctly.
Try ftp'ing as ascii next time and you shouldn't have to go through the
extra steps on unix.

Peter J. Krawetzky
-Original Message-
From: Joe Brown <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, February 22, 2001 12:08 PM
Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX


>I had a similar problem.
>
>Worked up a tnsnames.ora file on windoz machines.  Thought it would be no
>big deal if it was copied over to linux and used.  But there is a big
deal..
>Oracle can't handle the  character sequence, in a unix environment.
>
>Go figure...
>
>There used to be a dos2unix program lying around my linux box.  A couple of
>distributions later, I find none..
>
>vi works well though..
>
>$ vi tnsnames.ora
>:set ff=unix
>:w!
>
>Did the trick for me, HTH.
>-Joe
>
>""Peter J. Krawetzky"" <[EMAIL PROTECTED]> wrote in message
>001801c09cce$8c530160$[EMAIL PROTECTED]">news:001801c09cce$8c530160$[EMAIL PROTECTED]...
>> I appears that PHP does not know about the paths for Oracle.  I am only
>> guessing at this because I haven't installed Oracle on a Linux/Apache box
>> but I think Apache is not aware of the Oracle paths that are required.
>You
>> might need to recompile Apache with the appropriate configuration
>> parameters.
>> -Original Message-
>> From: Vlad <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> Date: Thursday, February 22, 2001 7:40 AM
>> Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in
XXX
>>
>>
>> >Hi All
>> >Oracle is installed on SCO UnixWare
>> >Client that I use to connect on Windows 98
>> >env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined
>> >by the way I created ODBC source for my ORACLE connection and tested it.
>> >Then I tryed to connect using PHP's odbc_connect and have the same
>> >problem...
>> >Is there any solution?
>> >Thanks, Vlad
>> >
>> >> Make sure your tnsnames.ora file is setup correctly and that your
>> >> environment variables are setup correctly.
>> >>
>> >> What OS are you using on the machine that Oracle is installed on?
>> >>
>> >> Peter J. Krawetzky
>> >> -Original Message-
>> >> From: Vlad <[EMAIL PROTECTED]>
>> >> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> >> Date: Thursday, February 22, 2001 3:25 AM
>> >> Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX
>
>> >>
>> >>
>> >> >Hello All
>> >> >I have some problems connecting ORACLe from my php script.
>> >> >connection string:
>> >> >  $conn = OCILogon("asu", "asu", "asu");
>> >> >failed with
>> >> >  ORA-12154: TNS:could not resolve service name in XXX
>> >> >
>> >> >Regards, Vlad
>> >> >e-mail: [EMAIL PROTECTED]
>> >> >IóQ: 1042225964
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >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 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 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] ORA-12154: TNS:could not resolve service name in XXX

2001-02-22 Thread Peter J. Krawetzky

I appears that PHP does not know about the paths for Oracle.  I am only
guessing at this because I haven't installed Oracle on a Linux/Apache box
but I think Apache is not aware of the Oracle paths that are required.  You
might need to recompile Apache with the appropriate configuration
parameters.
-Original Message-
From: Vlad <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, February 22, 2001 7:40 AM
Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX


>Hi All
>Oracle is installed on SCO UnixWare
>Client that I use to connect on Windows 98
>env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined
>by the way I created ODBC source for my ORACLE connection and tested it.
>Then I tryed to connect using PHP's odbc_connect and have the same
>problem...
>Is there any solution?
>Thanks, Vlad
>
>> Make sure your tnsnames.ora file is setup correctly and that your
>> environment variables are setup correctly.
>>
>> What OS are you using on the machine that Oracle is installed on?
>>
>> Peter J. Krawetzky
>> -Original Message-
>> From: Vlad <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> Date: Thursday, February 22, 2001 3:25 AM
>> Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX
>>
>>
>> >Hello All
>> >I have some problems connecting ORACLe from my php script.
>> >connection string:
>> >  $conn = OCILogon("asu", "asu", "asu");
>> >failed with
>> >  ORA-12154: TNS:could not resolve service name in XXX
>> >
>> >Regards, Vlad
>> >e-mail: [EMAIL PROTECTED]
>> >IóQ: 1042225964
>> >
>> >
>> >
>> >--
>> >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 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] ORA-12154: TNS:could not resolve service name in XXX

2001-02-22 Thread Peter J. Krawetzky

Make sure your tnsnames.ora file is setup correctly and that your
environment variables are setup correctly.

What OS are you using on the machine that Oracle is installed on?

Peter J. Krawetzky
-Original Message-
From: Vlad <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, February 22, 2001 3:25 AM
Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX


>Hello All
>I have some problems connecting ORACLe from my php script.
>connection string:
>  $conn = OCILogon("asu", "asu", "asu");
>failed with
>  ORA-12154: TNS:could not resolve service name in XXX
>
>Regards, Vlad
>e-mail: [EMAIL PROTECTED]
>IóQ: 1042225964
>
>
>
>--
>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] retrieval of NEXT, PREV records

2001-02-20 Thread Peter J. Krawetzky

Check for a return code from the (I assume you are using a relational
database) database stating a row was not found.  If the condition is true,
then re-execute the ID+1 or ID-1 code to select the next row in sequence.
You can keep looping through this until you get a return code from the
database that states a row was found.

Peter
-Original Message-
From: Adv. Systems Design <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, February 20, 2001 9:41 AM
Subject: [PHP-DB] retrieval of NEXT, PREV records


>I have set up links to browse records one by one,
>using (ID+1) for NEXT and (ID-1) for PREV...the only
>problem is that if there is a hole in the ID sequence
>(as from DELETION), there is no record returned...How
>can I have it so that the 'holes' are paved over and
>not returned?
>
>TIA
>
>Luis
>
>__
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.com/
>
>--
>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] Deleting single record

2001-02-20 Thread Peter J. Krawetzky

What exactly are you trying to do?  Drop a database or delete a row from
your table?  Your DELETE syntax is right but when you refer to db, what do
you mean?  The delete statement is designed to delete a row from a table.
The syntax is:  DELETE FROM table-name WHERE column-name = something.  The
column-name must be a valid column name in an existing table (table-name).
The something must contain a valid value in the table.

We really can't tell what the error is since you didn't include the actual
return code number in your message.  The list can only speculate what you
are trying to do.

Peter J. Krawetzky

-Original Message-
From: John Miller <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, February 19, 2001 8:35 PM
Subject: [PHP-DB] Deleting single record


>
>>The following big chunk of code produces the following line:
>>uukjh has been deletedMySql has been selectedDELETE FROM db WHERE Db =
>>uukjhUser Db has failed
>>Which tells me that everything but the delete command does not work.
>>
>>The above line is broken down to database name has been deleted, The
>>selecting of the database worked, my sql command looks good (I think) and
>>that the delete command failed.  When I log in the MySql through the
>>command promt, the record is still there.  I have compared the command
that
>>I type into delete the record to the one that the computer products and
>>there is no differenct.
>>
>>Please help
>>John
>>
>>
>>$link = @mysql_connect("","$PHP_AUTH_USER","$PHP_AUTH_PW")
>> or die ("$PHP_AUTH_USER is not authorized to delete the
>> database");
>> $result = mysql_drop_db($db_name,$link);
>> if ($result) {
>>  echo "$db_name has been deleted";
>>  } else {
>>  printf("Unable to delete $db_name\n");
>>  echo mysql_error($link);
>>  }
>>
>>  $link = @mysql_connect("","youknowwho","nonofyourbusiness")
>>  or die("Unable to connect to update db table" );
>>  $selected = @mysql_select_db("mysql",$link);
>>  if ($selected) {
>>  echo "MySql has been selected";
>>  } else {
>>  echo "Can't select MySql";
>>  exit;
>>  }
>>  $sql = "DELETE FROM db WHERE Db = $db_name";
>>  echo $sql;
>>  $result = @mysql_query("$sql","$link");
>>   // or die("Could not update User Db");
>>  echo mysql_error($link);
>>  echo $result;
>>  if ($result) {
>>  echo "User Db is updated";
>>  } else {
>>  echo "User Db has failed";
>>  }
>
>
>--
>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] installing

2001-02-06 Thread Peter J. Krawetzky

If I understand your question correctly, you are asking why you need to
upload your php scripts to a server and why can't you see the result on your
workstation without the upload?

Easy.  PHP is a server driven interpreter.  You must have the PHP
executables installed either on the server or your local workstation.  If
you go http:\\www.php.net, you will find a win32 installation section.  You
will also need to have Personal Web Server installed on your workstation.
Internet Explorer is not setup to run php by itself.  It needs a webserver
to do it.

If you don't want to use Micrsofts Personal Web Server, you can download the
win32 version of Apache at www.apache.org.

-Original Message-
From: peter paauwe <[EMAIL PROTECTED]>
To: php maillijst <[EMAIL PROTECTED]>
Date: Tuesday, February 06, 2001 1:38 PM
Subject: [PHP-DB] installing


Hello,

Got a major problem with seeing the result of my php scripts without
uploading them to a server. I don't have a server myself. Do I need to have
one or can I see my writen scripts and see the results directly in my
internet explorer?

thanks,

ufo



-- 
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] Viewing the DB

2001-01-24 Thread Peter J. Krawetzky

SELECT * FROM SYSIBM.SYSTABLES OR SELECT * FROM SYSCAT.TABLES.

The first select statement will also show views.
-Original Message-
From: Alarion <[EMAIL PROTECTED]>
To: 'Scott Fletcher' <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Wednesday, January 24, 2001 11:23 AM
Subject: RE: [PHP-DB] Viewing the DB


>This was taken from one of the doc's on IBM's site:
>
>SYSTABLES contains a row for every table and view in the SQL collection. It
>tells you if the object is a table or view, the object name, the owner of
>the object, what SQL collection it is in, and so forth.
>The following sample statement displays information for the
>CORPDATA.DEPARTMENT table:
>  SELECT *
>FROM CORPDATA.SYSTABLES
>WHERE NAME = 'DEPARTMENT'
>
>so a "select * from .systables" should get you a list of all table
>names (theoretically) ;P
>
>Sean
>
>-Original Message-
>From: Scott Fletcher [SMTP:[EMAIL PROTECTED]]
>Sent: Wednesday, January 24, 2001 3:48 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP-DB] Viewing the DB
>
>I'm using IBM DB2.  No Oracle, No mySQL.
>
>Scott
>""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message
>94mt56$skf$[EMAIL PROTECTED]">news:94mt56$skf$[EMAIL PROTECTED]...
>> Does anyone know what is the sql command that would allow me to view all
>of
>> the tables in the database?
>>
>> Scott
>>
>>
>>
>> --
>> 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 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] multiple delete

2001-01-17 Thread Peter J. Krawetzky

delete from table-name will delete all the rows from a table.  Adding a where clause 
to the end of it will delete rows which meet the where criteria.  You might want to 
purchase a good SQL book for this command and others.
-Original Message-
From: Cahyo S. Aji <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, January 17, 2001 7:57 AM
Subject: [PHP-DB] multiple delete


>
>What is the query to delete multiple rows from a table or multiple tables?
>Is there any simple queries to do it?
>
>
>_Ajik_
>
>
>-- 
>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]
>
>