[PHP-DB] about connect to two database

2001-01-31 Thread Steven

I installed redahat 6.2,Apache 1.3.12 and php4.0 compiled with OCI8 in
my machine.
I can successfully connect to one remote Oracle8i database using php4.0.

But when I wanted to connect to two separat remote Oracle8i DB,I found
a problem to do that.The problem is that: when I  successfully connect
to one remote Oracle8i DB
then I couldn't connect to anther.Could you help me to solve this
problem.

thanks,

Steven


-- 
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] broken after upgrade. Help!

2001-01-31 Thread Wayne Bastow

Kirk,

When you upgraded the distribution did it also upgrade PHP?
If so, the PHP upgrade may not have been built with postgres support.
You may have to rebuild PHP from source letting configure know where postgres 
is.

Wayne

On Wed, 31 Jan 2001 23:48, Kirk Reiser wrote:
> Hi Folks: I use php3 as an interface to a postgres database under an
> apache server.  I have been using this configuration for about a year
> and a half.  A few weeks ago I had to update my distribution because
> of another package I needed to install, and now I get an error in my
> php3 scripts.  The error is something like:
>
> fatal error: use of unsupported or undefined function call
> pg_connect() in line 4 of...
>
> That isn't the syntax exactly but it's close.  I have looked through
> the php3 manual and the FAQ and well, everything else I can think of.
> I don't seem to be able to get a good understanding from the
> documentation exactly the relationship between apache modules, php3
> and the postgresql backend.
>
> Why would functions I've been using become unavailable?  It maybe as
> simple as an apache configuration that got changed during upgrading,
> I'm not sure.  If anyone can give me an idea about what's going on, I
> would sure appreciate it.  For the record I am using debian potato as
> the distribution, apache 1.3.9, postgresql 6.5.2.3 and php 3.0.18.
>
>   Kirk

-- 
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] question ! show binary

2001-01-31 Thread James Smith

The way you have it now, ur just storing the path to
the gif.  from the form field, use 
then in the insert area use:
$result = mysql_query("insert into (filename) VALUES
('$file')")

James
--- Yui Hiroaki <[EMAIL PROTECTED]> wrote:
> HI!
> 
>   I am using PHP in mySQL. I create table in database
> and insert
> 'binary'(*.gif).
> But I do not know how to use this binary using PHP
> and show website. Please
> help me.
> 
> 
> $)create table xxx (col longlob);
> $)insert into xxx values("image\yyy.gif");
> 
> 
> I want to display :yyy.gif in html
> 
> 
> 
> Thank you
> yui
> 
> -- 
> 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]
> 


__
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-DB] RE: [PHP] .htpasswd?

2001-01-31 Thread Thor M. Steindorsson

check this out:

http://www.hotscripts.com/Detailed/3903.html

It does what you're asking for... 
why write the code when you can copy and paste? :)


-Original Message-
From: James Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 1:22 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] .htpasswd?


Is there a way that when a user signs up for a
user/pass on a site, to automatically update the
.htpasswd on the site?  Right now I'm running a Win2k
Pro, with Apache installed and MySQL/PHP.  

Thanks,

James

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General 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 upgrade MySQL PHP Client

2001-01-31 Thread Wayne Bastow

Fabrice,

You may need to rebuild PHP to get it to look at the newer version of MySQL.
When it was originally built the 3.23.22-beta version of MySQL was probably 
what PHP was built against.

If you go into the PHP source directory and do a configure, make and make 
install (letting the configure script know where the newer version of MySQL 
is) then PHP should be using the newer version of MySQL.

Wayne

On Wed, 31 Jan 2001 19:23, Fabrice Houvet wrote:
> Hello,
>
> I use the latest version of PHP (4.0.4pl1) and the latest stable version of
> MySQL (3.23.32) for my Apache Web Site.
>
> I see PHP use the 3.23.22-beta version of MySQL Client API.
>
> Can you explain me how i can upgrade the PHP MySQL Client ? A new PHP
> module version does exist ? May be only an upgrade of ext/mysql/libmysql
> directory is sufficient ?
>
> Thank for your response.
>
> Best Regards,
>
>
> Fabrice.

-- 
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] Oracle Persistant Connections

2001-01-31 Thread Serge Paquin

Good Day all,

A question about persistent connections.

I am using Oracle8i and want to make a little php script that will be run a
huge amount of times (i hope ).  PHP has the OCIPLogon for persistent
connections and am wondering the details of how it works.

I want the php script to run a simple insert then select statement and would
like to avoid a huge logon penalty that comes with creating a new session
to oracle since the life of the program is very short and the frequency
very very high (again I hope).

Any input would be very helpful.

Thanks,
Serge.



Re: [PHP-DB] Help Me!

2001-01-31 Thread Beau Lebens

the way i have attacked a similar situation in the past was to create my 
own formatting system - kind of a pseudo-html set-up, which made use of 
conventions like;

**bold**
%%italic%%
__underline__
!!titlefont!!

etc etc
then you can save the article directly into the DB, as a text or whatever, 
and when you print it out, do something like;

echo specialTxtFormat($articleBody);

a function which would include a call to nl2br() as well as the replacement 
of things like

**bold** for bold

enjoy

At 04:13 AM 2/1/01 +, Sridhar Ranganathan wrote:
>Hi Netlanders
>
>I have just undertaken a web site construction project. It is a devshed 
>like site that serves articles on various topics. I am using LAMP - 
>Linux/Apache/MySQL/PHP 4. I have a table that contains info about each 
>article. I think I have three options...(or do I have more that I dont 
>know of?!)
>
> 1. Store the article body in the database as a LONGTEXT or BLOB
> 2. Separate plain text file
> 3. Separate HTML formatted file
>
>No matter whether the file is in the database or as a separate file, 
>should it be formatted?
>If it is plain text, how do I make distinctions between bold text and 
>normal text?
>(Will fread() using PHP give me '\n' and other such characters too?)
>If it is HTML formatted, I would loose some control over the look and I 
>would have to copy and paste the plain text article and make it a HTML file.
>
>What should I do?
>
>I know I have already asked this question and got some answers. But, when 
>I proceeded with the project, I kept comming back to this one point. A 
>long answer might help. Looking forward to your help.
>
>Regards
>Srinivasan Ranganathan
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]

-- 
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/


-- 
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] Speed Hit with MySQL TEXT fields?

2001-01-31 Thread phobo

In a database with no more than 100 rows, is it better to have several (a
dozen or so) large column sizes (200-300 bytes), or to have TEXT fields; as
many of the columns can be from null to full-use ... I'm not worried about
diskimprint; only speed ... All look-ups are done on the primarykey, which
is indexed, so a fixed size will make lookup almost instant, whereas dynamic
sized records will slow this down ... is this slow down considerable (MySQL,
PHP, Apache / Redhat server) ??

Is there a disussuion of this somewhere?

Siggy


-- 
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] Help Me!

2001-01-31 Thread phobo

Why bother with pseudo ?

Just only have , , and  allowed in the database. Also, storing the
 and  tags may be important. Be sure not to do things like allowing
font color or face; although relative size might be ok (FONT SIZE="-1") etc.

Siggy

- Original Message -
From: "Beau Lebens" <[EMAIL PROTECTED]>
To: "Sridhar Ranganathan" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 5:46 PM
Subject: Re: [PHP-DB] Help Me!


> the way i have attacked a similar situation in the past was to create my
> own formatting system - kind of a pseudo-html set-up, which made use of
> conventions like;
>
> **bold**
> %%italic%%
> __underline__
> !!titlefont!!
>
> etc etc
> then you can save the article directly into the DB, as a text or whatever,
> and when you print it out, do something like;
>
> echo specialTxtFormat($articleBody);
>
> a function which would include a call to nl2br() as well as the
replacement
> of things like
>
> **bold** for bold
>
> enjoy
>
> At 04:13 AM 2/1/01 +, Sridhar Ranganathan wrote:
> >Hi Netlanders
> >
> >I have just undertaken a web site construction project. It is a devshed
> >like site that serves articles on various topics. I am using LAMP -
> >Linux/Apache/MySQL/PHP 4. I have a table that contains info about each
> >article. I think I have three options...(or do I have more that I dont
> >know of?!)
> >
> > 1. Store the article body in the database as a LONGTEXT or BLOB
> > 2. Separate plain text file
> > 3. Separate HTML formatted file
> >
> >No matter whether the file is in the database or as a separate file,
> >should it be formatted?
> >If it is plain text, how do I make distinctions between bold text and
> >normal text?
> >(Will fread() using PHP give me '\n' and other such characters too?)
> >If it is HTML formatted, I would loose some control over the look and I
> >would have to copy and paste the plain text article and make it a HTML
file.
> >
> >What should I do?
> >
> >I know I have already asked this question and got some answers. But, when
> >I proceeded with the project, I kept comming back to this one point. A
> >long answer might help. Looking forward to your help.
> >
> >Regards
> >Srinivasan Ranganathan
> >_
> >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]
>
> --
> Beau Lebens - Web Master
> Insurance My Way, Your Friendly Online Broker
> (08) 9226 5888
> http://www.insurancemyway.com.au/
>
>
> --
> 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] Help Me!

2001-01-31 Thread Sridhar Ranganathan

Hi Netlanders

I have just undertaken a web site construction project. It is a devshed like 
site that serves articles on various topics. I am using LAMP - 
Linux/Apache/MySQL/PHP 4. I have a table that contains info about each 
article. I think I have three options...(or do I have more that I dont know 
of?!)

1. Store the article body in the database as a LONGTEXT or BLOB
2. Separate plain text file
3. Separate HTML formatted file

No matter whether the file is in the database or as a separate file, should 
it be formatted?
If it is plain text, how do I make distinctions between bold text and normal 
text?
(Will fread() using PHP give me '\n' and other such characters too?)
If it is HTML formatted, I would loose some control over the look and I 
would have to copy and paste the plain text article and make it a HTML file.

What should I do?

I know I have already asked this question and got some answers. But, when I 
proceeded with the project, I kept comming back to this one point. A long 
answer might help. Looking forward to your help.

Regards
Srinivasan Ranganathan
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]




Re: [PHP-DB] newlines in boxes..

2001-01-31 Thread Xsarus Internetdiensten

He!

It's very simple! When you've a , and want
per example to insert it into the database, use the PHP function nl2br() at
the moment after select and print the data.

So, it will be:

- first insert the $text into the database
- SELECT text FROM XXX et. etc.
- $text = nl2br($text); (PHP inserts 's into $text)
- print($text);

You can also directly use the function nl2br and print the string after
submitting the form!

Ready!

Simple, isn't???

Bey bey,
Daniel Kieviet
Xsarus Internetservices
The Netherlands
http://www.xsarus.nl
[EMAIL PROTECTED]


- Original Message -
From: "James Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 1:18 PM
Subject: [PHP-DB] newlines in  boxes..


> Alright, on my site, I have a news section, whenever i
> goto insert new news in the Admin area, I have to
> insert  or /n in it, while typing in the news.
> How do I make this a automated process I know it can
> be done, but addslashes doesn't work and
> htmlspecailchars() doesn't work what will?
>
> Thanks,
>
> James
>
> __
> 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]




[PHP-DB] .htpasswd?

2001-01-31 Thread James Smith

Is there a way that when a user signs up for a
user/pass on a site, to automatically update the
.htpasswd on the site?  Right now I'm running a Win2k
Pro, with Apache installed and MySQL/PHP.  

Thanks,

James

__
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-DB] Re: [PHP] .htpasswd?

2001-01-31 Thread david klein


Yes, you can, just write a script to call "htpasswd -b yourUserFile userID 
passwd".

:)
David

>From: James Smith <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: [PHP] .htpasswd?
>Date: Wed, 31 Jan 2001 13:21:35 -0800 (PST)
>
>Is there a way that when a user signs up for a
>user/pass on a site, to automatically update the
>.htpasswd on the site?  Right now I'm running a Win2k
>Pro, with Apache installed and MySQL/PHP.
>
>Thanks,
>
>James
>
>__
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.com/
>
>--
>PHP General 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]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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-DB] Re: [PHP] newlines in boxes..

2001-01-31 Thread Michael Hall


Use nl2br (new line to ).

Mick

On Wed, 31 Jan 2001, James Smith wrote:

> Alright, on my site, I have a news section, whenever i
> goto insert new news in the Admin area, I have to
> insert  or /n in it, while typing in the news. 
> How do I make this a automated process I know it can
> be done, but addslashes doesn't work and
> htmlspecailchars() doesn't work what will?  
> 
> Thanks,
> 
> James
> 
> __
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 
> -- 
> PHP General 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] SQL Newbie Database search question

2001-01-31 Thread Lucas Rockwell

for the second one you can do a subquery:

select specific_p from  where specific_p like '%68030% and
specific_p in (select distinct specific_p from );

this finds all the distinct specific_p fields and then does a query on
them -- that table (remember SQL ONLY returns tables) -- for the like
'%68030%'.

this may not be exactly what you want, but you can play with it a bit.

if you think tables, SQL really makes sense.

-lucas

On Wed, 31 Jan 2001, Miles Thompson wrote:

> add DISTINCT to your query 
> select distinct specific_p, qty from database where specific_p = 68030 and 
> qty > 0
> 
> For you second requirement, get them all, and just use the first one ... 
> can't remember exact syntax but something like
> 
> select specific_p from database where specific_p like %68030% limit 1
> or maybe it's TOP 1. Can't remember. Check your Sql Server docs.
> 
> Miles
> 
> At 08:28 AM 1/31/01 -0600, Robert wrote:
> >I have a database with several fields...
> >I only want certain fields to show in my results
> >Some of the searched fields have the same value
> >
> >example: searched field is specific_p
> >specific_p   comment   qty
> >68030  9845 0
> >68030  9844 100
> >68030  9843 12
> >68030rc509843 50
> >
> >I want to show the 68030, but not the comment. I also don't want to show 
> >three seperate 68030s and pick one that is not 0 qty if there is one.
> >Is there an MSSQL command to only get one of them?
> >There may be other parts that are close too I want to search for %68030% 
> >to get all of them but show only one of them.
> >
> >I could probably write a filter, but WHY if it is built into SQL?
> 
> 
> -- 
> 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] load data conditionally

2001-01-31 Thread jaskirat singh

I think you could do this.
Load all the data. 
Then "delete from table where name != extension"


At 08:01 PM 1/30/01 -0500, Mark @ 10base-t wrote:
>Hey there,
>Can you use the load data infile command to load stuff in only if certain
>fields match?  Or would I have to do this via some php loop?
>
>Basically I have a txt file with 5 fields in it. First name, extension,
>space, seat, cluster.
>
>I only wanna update a record with the space seat and cluster information as
>long as the extension  and first name are a match.
>
>Thanks!
>Marky 
>
>
>-- 
>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] php4 and sybase-ct support on win

2001-01-31 Thread Torsten Curdt

Does anybody know how to get sybase-ct support
to work under windows?

I added the extension dll in the php.ini. Then
the libct.dll was missing. The only place
I found it was in an "Open Client" update
at www.sybase.com.

Doesn't Sybase provide the client libs or
do I just don't find them?
--
Torsten

-- 
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] SQL Newbie Database search question

2001-01-31 Thread Miles Thompson

add DISTINCT to your query 
select distinct specific_p, qty from database where specific_p = 68030 and 
qty > 0

For you second requirement, get them all, and just use the first one ... 
can't remember exact syntax but something like

select specific_p from database where specific_p like %68030% limit 1
or maybe it's TOP 1. Can't remember. Check your Sql Server docs.

Miles

At 08:28 AM 1/31/01 -0600, Robert wrote:
>I have a database with several fields...
>I only want certain fields to show in my results
>Some of the searched fields have the same value
>
>example: searched field is specific_p
>specific_p   comment   qty
>68030  9845 0
>68030  9844 100
>68030  9843 12
>68030rc509843 50
>
>I want to show the 68030, but not the comment. I also don't want to show 
>three seperate 68030s and pick one that is not 0 qty if there is one.
>Is there an MSSQL command to only get one of them?
>There may be other parts that are close too I want to search for %68030% 
>to get all of them but show only one of them.
>
>I could probably write a filter, but WHY if it is built into SQL?


-- 
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] SQL Newbie Database search question

2001-01-31 Thread Robert

I meant to say:

There may be other parts that are close too I want to search for %68030% to
get all of them but show only one of each different specific_p.




-- 
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] SQL Newbie Database search question

2001-01-31 Thread Robert

I have a database with several fields...
I only want certain fields to show in my results
Some of the searched fields have the same value

example: searched field is specific_p
specific_p   comment   qty
68030  9845 0
68030  9844 100
68030  9843 12
68030rc509843 50

I want to show the 68030, but not the comment. I also don't want to show three 
seperate 68030s and pick one that is not 0 qty if there is one.
Is there an MSSQL command to only get one of them? 
There may be other parts that are close too I want to search for %68030% to get all of 
them but show only one of them.

I could probably write a filter, but WHY if it is built into SQL?




[PHP-DB] PHPub: A Zend IDE/DEBUGGER Alternative

2001-01-31 Thread Ralph Guzman

I am glad to see others working on alternatives to the highly cost Zend products. I 
came across PHPub, a PHP IDE/Debugger which I've never seen mentioned on this list. 
Even though it is still not ready for final release, it's seems pretty stable. Great 
Features. One of it's cool features is a built in interactive SQL client. Looks very 
promising!

http://capnbry.dyndns.org/phpub/
 





Get you FREE Firstname email address at http://www.Firstname.com

Get a FREE Cell Phone at http://www.freecellphonedeal.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]




Re: [PHP-DB] storing query result in arrays: waste of memory?

2001-01-31 Thread Stas Trefilov

Hello, "Tyson Lloyd Thwaites"!
You wrote:

> Is it better to retrieve the whole table up-front and 
> store it in a session
> array, or to run the queries seperately each time the 
> data is needed and
> specify the column targets?
> 

First read all the short columns from the row in your base 
class constructor (or get(), or whatever) and the rowID of 
the record, to minimize access time when you need CLOB 
content. Don't cache CLOBs.

-- 
Piloteers do it on the road


-- 
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] broken after upgrade. Help!

2001-01-31 Thread Kirk Reiser

Hi Folks: I use php3 as an interface to a postgres database under an
apache server.  I have been using this configuration for about a year
and a half.  A few weeks ago I had to update my distribution because
of another package I needed to install, and now I get an error in my
php3 scripts.  The error is something like:

fatal error: use of unsupported or undefined function call
pg_connect() in line 4 of...

That isn't the syntax exactly but it's close.  I have looked through
the php3 manual and the FAQ and well, everything else I can think of.
I don't seem to be able to get a good understanding from the
documentation exactly the relationship between apache modules, php3
and the postgresql backend.

Why would functions I've been using become unavailable?  It maybe as
simple as an apache configuration that got changed during upgrading,
I'm not sure.  If anyone can give me an idea about what's going on, I
would sure appreciate it.  For the record I am using debian potato as
the distribution, apache 1.3.9, postgresql 6.5.2.3 and php 3.0.18.

  Kirk

-- 

Kirk Reiser The Computer Braille Facility
e-mail: [EMAIL PROTECTED] University of Western Ontario
phone: (519) 661-3061

-- 
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 upgrade MySQL PHP Client

2001-01-31 Thread Fabio Ottolini (EDB)

As far as I know this is the latest version of thie client.

Best regards,

Fábio Ottolini

> -Original Message-
> From: Fabrice Houvet [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 6:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] How to upgrade MySQL PHP Client
> Importance: High
> 
> 
> Hello,
> 
> I use the latest version of PHP (4.0.4pl1) and the latest 
> stable version of
> MySQL (3.23.32) for my Apache Web Site.
> 
> I see PHP use the 3.23.22-beta version of MySQL Client API.
> 
> Can you explain me how i can upgrade the PHP MySQL Client ? A new PHP
> module version does exist ? May be only an upgrade of 
> ext/mysql/libmysql
> directory is sufficient ?
> 
> Thank for your response.
> 
> Best Regards,
> 
> 
> Fabrice.
> 
> 
> 
> 
> -- 
> 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] foreign key problem

2001-01-31 Thread Bob Hall

Yes sir, you are correct. Thank you for correcting me. In practice, a 
NULL in a foreign key almost always means an orphan record. In most 
applications the designer will want to use the NOT NULL constraint.

Bob Hall

>A foreign key value can be null, if it suits the data application - or that
>is what I've always been taught.
>
>Here is a text book definition of Referential Integrity which was spoon fed
>to me by the Open University when studying their RDBMS course:
>
>"Referential Integrity - If a relation (table), R2 has a foreign key, F,
>that references the primary key, P, in another relation (table), R1, then
>every R2.F entry must either be a value equal to an R1.P primary key value
>or be null"
>
>Regards,
>Chris
>
>  > -Original Message-
>  > From: Bob Hall [mailto:[EMAIL PROTECTED]]
>  > Sent: 31 January 2001 01:53
>  > To: [EMAIL PROTECTED]
>  > Subject: Re: [PHP-DB] foreign key problem
>  >
>  >
>  > >hello all!
>  > >i have a little problem ,hope someone can help me out
>  > >the problem is :
>  > >let i have two tables T1 and T2 ,now T1 has following
>  > >fields
>  > >cntryid
>  > >cntryname
>  > >cntrycode etc.
>  > >now cntryid is the primary key now i want to make the
>  > >cntryid a foreign key in table T2 .so how can i do it
>  > >plz help me .
>  > >msjamal
>  >
>  > A column is a foreign key because it contains only values found in
>  > the referenced key, and no NULLs. Design your database so that the
>  > foreign key column contains only values from cntryid.
>  >
>  > If you want to know how to declare a referenced key/foreign key
>  > relationship, you will have to specify what RDBMS you are using.
>  >
>  > Bob Hall
>  >
>  > Know thyself? Absurd direction!
>  > Bubbles bear no introspection. -Khushhal Khan Khatak
>  >
>  > --
>  > 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]

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-- 
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] foreign key problem

2001-01-31 Thread Chris Andrew

A foreign key value can be null, if it suits the data application - or that
is what I've always been taught.

Here is a text book definition of Referential Integrity which was spoon fed
to me by the Open University when studying their RDBMS course:

"Referential Integrity - If a relation (table), R2 has a foreign key, F,
that references the primary key, P, in another relation (table), R1, then
every R2.F entry must either be a value equal to an R1.P primary key value
or be null"

Regards,
Chris

> -Original Message-
> From: Bob Hall [mailto:[EMAIL PROTECTED]]
> Sent: 31 January 2001 01:53
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] foreign key problem
>
>
> >hello all!
> >i have a little problem ,hope someone can help me out
> >the problem is :
> >let i have two tables T1 and T2 ,now T1 has following
> >fields
> >cntryid
> >cntryname
> >cntrycode etc.
> >now cntryid is the primary key now i want to make the
> >cntryid a foreign key in table T2 .so how can i do it
> >plz help me .
> >msjamal
>
> A column is a foreign key because it contains only values found in
> the referenced key, and no NULLs. Design your database so that the
> foreign key column contains only values from cntryid.
>
> If you want to know how to declare a referenced key/foreign key
> relationship, you will have to specify what RDBMS you are using.
>
> Bob Hall
>
> Know thyself? Absurd direction!
> Bubbles bear no introspection. -Khushhal Khan Khatak
>
> --
> 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] How to upgrade MySQL PHP Client

2001-01-31 Thread Fabrice Houvet

Hello,

I use the latest version of PHP (4.0.4pl1) and the latest stable version of
MySQL (3.23.32) for my Apache Web Site.

I see PHP use the 3.23.22-beta version of MySQL Client API.

Can you explain me how i can upgrade the PHP MySQL Client ? A new PHP
module version does exist ? May be only an upgrade of ext/mysql/libmysql
directory is sufficient ?

Thank for your response.

Best Regards,


Fabrice.




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