[PHP-DB] MySQL Error???

2001-06-28 Thread Brian Grayless

Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
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] static or dynamic printer-friendly webpages?

2001-06-28 Thread sgibbs

Question for all you php experts out there: 

My organization's website is based on mysql/php backend - 95% of the
webpages are generated dynamically using templates and database records. 

We have been asked to create printer-friendly versions of these pages. 

Now for your opinion/advice: should we (1)create another template called
print.php for example and generate there print friendly pages dynamically
or should we (2)create static html copies of each database record so that
they are print friendly? 

By print friendly I mean I want a page that doesn't have the text cut off
the right hand side of the page (nevermind, for now, that the original page
shouldn't do this 
in the first place :) ) 

Thank you so much for your help! 

- Shawna 



[PHP-DB] Using regexps to clean up html files

2001-06-28 Thread olinux o

hi all,

I have a very large project where I have to insert
information from a large number of HTML files. They
are pulled from a public web database so they are
somewhat consistent in format. However not all fields
are present in each. So what I have decided to do is.

Write a script that parses the files of extraneous
spaces etc. and inserts into a CSV file to be imported
into the DB structure.

I figure that I can do something like Grab
information following 'FIELD NAME:' until ' ' (blank
space).

However, Some fields may contain two or more words.
Such as, PROPERTY TYPE: Retail or PROPERTY TYPE:
Industrial Facility

So how do I account for this. I have thought that I
may try to Grab everything BETWEEN two field names
[only this becomes a problem if a field is not
present].

Can anyone give me some tips on writing this script. I
have done very little work with string manipulation.
If you would like some sample files, please contact me
off list. 

Thank you so much.

olinux

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
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]




Re: [PHP-DB] Storing Code in a db?

2001-06-28 Thread Andreas D. Landmark

At 27.06.2001 14:06, you wrote:
Hey there,
Is it possible to store code like a function, for example, in a mysql
database and pull it into a php dynamicallly so you can use the function if
needed?


Not in a way that would be effective, the only way I could see it work is 
if you
use a script to pull the function out of the database, write it to a file, 
and then
include your newly written file... Which ofcourse would require a reload or
2 scripts.

I'd stick with a couple of includes if I were you =).


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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] Modify Query, or sift through results?

2001-06-28 Thread Steve

Couldn't you useSELECT  DISTINCT  for this?

http://www.mysql.com/doc/S/E/SELECT.html




- Original Message - 
From: Joseph Koenig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 8:54 AM
Subject: [PHP-DB] Modify Query, or sift through results?


 I've got a script that searches a db every night and sends out e-mail if
 it finds something a person would be interested in, based on criteria
 they gave us. The problem is that I have one field that stores regions
 of the country in a very unpleasant way. It stores them as:
 
 Northeast;West;South
 
 So all of the regions for one record go into one field. The problem is
 that when searching that, if someone has a preference  of 'North', I
 dont want to pull records that have 'Northeast', as would happen with
 the above example. Is there a way to modify the MySQL query so as to
 find only 'North', keeping in mind that 'North' may be the 3rd in a list
 of semi-colon separated regions? Or do I need to sift through the
 results in PHP to clean them up? Thanks,
 
 Joe
 
 -- 
 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] Oracle Client to connect to remote DB

2001-06-28 Thread Mindblender

Do you know if the Oracle client can beinstalled via the command line?  I
don't have access to the box itself, only telnet access.

Jeff

Brian S. Dunworth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Jeff,

   As far as I know, you cannot get *only* the Oracle client for Linux.
  When I called Oracle Worldwide Support and asked for one, they sent me
the
 whole Oracle 8i installation package for Linux.  No problem, though --
when
 you start the install on your Linux machine, you can choose to install
only
 the client.   That's what I did, and it's working fine connecting to the
 Oracle 8i database on our Sun.


 -Original Message-
 From: Mindblender [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, June 26, 2001 12:35 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Oracle Client to connect to remote DB

 I read a post on faqt.com that said that I could connect to a remote
Oracle
 DB if I had the Oracle client installed.  Does anyone know where I can get
 a
 copy of only the client for Linux?  I don't want to install the whole
 Oracle
 package, I use MySQL on the server, but have a client that is needing to
 connect to an Oracle DB on their server from mine.

 Any suggestions?

 Thanks,
 Jeff
 

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

2001-06-28 Thread Jennifer Arcino Demeterio
hello!

does anyone knows how to delay a display of a certain page ... for example,
if i will click on "logout" button, it will show a page which will say
"logging out" then after 5 seconds it will redirect to the login page.


thanks =)


-- 
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 Code in a db?

2001-06-28 Thread Christopher Ostmo

Mark @ 10base-t pressed the little lettered thingies in this order...

 Hey there,
 Is it possible to store code like a function, for example, in a mysql
 database and pull it into a php dynamicallly so you can use the function if
 needed?
 

Yes, it is possible, but you need to run the code through eval() for it to 
do anything useful.
ie
while ($row = mysql_fetch_row($result)) {
echo eval($row[0]);
}

Good luck...

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Meeting cutting edge dynamic
web site needs

For a good time,
http://www.AppIdeas.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] MySQL Error???

2001-06-28 Thread Beau Lebens

sounds like your field definition is something like int(2) or something, it
needs to be bigger so that it can handle higher numbers for the unique
primary key :)

// -Original Message-
// From: Brian Grayless [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 28 June 2001 12:24 AM
// To: PHP DB list (E-mail)
// Subject: [PHP-DB] MySQL Error???
// 
// 
// Is anyone familiar with this MySQL error?
// 
// 1062: Duplicate entry '127' for key 1
// I wrote a great bookmark management program that works fine, 
// but everytime I
// insert bookmarks, I insert somewhere over 120 and I start 
// getting this
// error, and it won't add them anymore.  Any suggestions???
// 
// Thanks,
// 
// B R I A N   G R A Y L E S S
//   Web Administrator
//   Premier Resorts
//   www.premier-resorts.com
// 
// P: 435-655-4812
// F: 413-618-1518
// 
// 
// -- 
// 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] PHP Oracle Stored Functions

2001-06-28 Thread Laurence Veale

Hi,

Anyone have information on calling a stored function?

Is it similar to a stored procedure?

How to you access a return, thorugh OCIBindByName?

Regards,

Laurence Veale
ext 6172


--
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] managing variant data

2001-06-28 Thread Felix Meulenkamp

Guten Tag Herr Scott,

Montag, 25. Juni 2001, 11:21:42, schrieben sie:

JS Hi again, another conundrum.

JS What is the best way to deal with the following situation?

JS You have a group of common properties including a property that indicates a 
JS second group of common properties.  For example,
JS suppose you have this table:

JS Officers
JS 
JS Name
JS Rank
JS Age
JS Height
JS Weight
JS Species

JS The 'Species' property may have the following values: Vulcan, Human, 
JS Klingon, or Android.

JS If (Species==Vulcan) then you want to store these additional properties: 
JS MindmeldCount and YearsOnVulcan
JS If (Species==Klingon) then you want to store these additional properties: 
JS NumberofConcealedWeapons and RidgesOnForehead
JS If (Species==Android) then you want to store these additional properties: 
JS PositronicBrain and MemoryJigas
JS If (Species==Human) then you want to store these additional properties: 
JS AttendedStarfleetAcademy and BloodType

JS The problems I want to avoid are:
JS 1) placing all the properties for all species in the Officers table (as 
JS this would include unnecessary properties for each row) and
JS 2) storing the properties in the Officers in four seperate tables 
JS (Klingons, Humans, Androids, and Vulcans) redundantly.

 depends on what kind of DB you would like to use...
 on normal SQL-DBs you have to use something like Bill describes, on
 PostgreSQL you can use some feature like childs... says you make a
 officers-table with common values and then you make childs like
 klingon-officers, which extends officers. This means, that you all
 officers are automaticly stored in officers and the extra attributes
 are stored in the child-table.

 A third way is to use LDAP, there you can make an objectclass
 officer and a objectclass klingon-officer with the special
 attributes.

Mit freundlichen Grüssen

Felix Meulenkamp 

---
KDT Klaus Daten- und Telekommunikationstechnik GmbH
Ein  Unternehmen  der  Ision  Internet AG,  Hamburg
Robertstrasse 6* D-42107 Wuppertal, Germany
tel +49 202 495-362mailto:[EMAIL PROTECTED]
fax +49 202 495-399   http://www.kdt.de



-- 
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] MySQL Error???

2001-06-28 Thread Dobromir Velev

Hi,
This error occurs when your auto_increment index field is of type TINYINT.
This field type can accept values form -128 to 127 so you cannot add records
with index value greater than 127.
I recommend you change it to INT(11) UNSIGNED which can accept values from 0
to 4294967295.

If you expect to have more records you may consider using BIGINT type

For more info check the MySQL language reference.

Dobromir Velev


-Original Message-
From: Brian Grayless [EMAIL PROTECTED]
To: PHP DB list (E-mail) [EMAIL PROTECTED]
Date: Thursday, June 28, 2001 9:29 AM
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime
I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


--
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] Modify Query, or sift through results?

2001-06-28 Thread Dobromir Velev

Hi,
you could use the FIND_IN_SET(str,strlist) function which returns a value 1
to N if the string str is in the list strlist consisting of N substrings.
Returns 0 if str is not in strlist or if strlist is the empty string.
Returns NULL if either argument is NULL.

If you want to find all the records that have 'North' you query will look
something like this

SELECT * FROM table_name WHERE FIND_IN_SET('North',regions_field)0

Dobromir Velev

-Original Message-
From: Joseph Koenig [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Thursday, June 28, 2001 4:50 AM
Subject: [PHP-DB] Modify Query, or sift through results?


I've got a script that searches a db every night and sends out e-mail if
it finds something a person would be interested in, based on criteria
they gave us. The problem is that I have one field that stores regions
of the country in a very unpleasant way. It stores them as:

Northeast;West;South

So all of the regions for one record go into one field. The problem is
that when searching that, if someone has a preference  of 'North', I
dont want to pull records that have 'Northeast', as would happen with
the above example. Is there a way to modify the MySQL query so as to
find only 'North', keeping in mind that 'North' may be the 3rd in a list
of semi-colon separated regions? Or do I need to sift through the
results in PHP to clean them up? Thanks,

Joe

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

2001-06-28 Thread Niel Zeeman

Hi there

Is there anyway of passing a xml document to a php page as raw data.

What I want to do is eg.
send a page a xml document and recieve a response ( in xml ) from that page.

I could eg get the result using fopen( 'http://url.com/xml.php' , 'r' )

but how do i send it any data without using for eg.
fopen(  http://url.com/xml.php?xml=xml_string_document , 'r' )

Any help would be VERY helpfull

thanks
Niel




-- 
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] FW: strange numbers in link

2001-06-28 Thread Jason k Larson

Shawna,

Feel free to change this value, it doesn't appear to bear any significance
and is probably a typo.

Jason k Larson


[EMAIL PROTECTED] wrote in message
BB6D932A42D6D211B4AC0090274EBB1D2EEE87@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EEE87@GLOBAL1...
 Our website uses mysql/php.  I found the link written below as a hard
 coded link and I can't figure out why the programmer would have used
 c2x5han as a keyword instead of  using chan as the keyword-  which is
an
 acronym for Child Health  Nutrition.

 A
HREF=/sources/search.php3?type=electronickeywords=c2x5hanoffset=0Child
 Health amp; Nutrition/A


 I thinking about changing the link but not sure what the repercussions
would
 be  - if any?

 Does any one have any ideas as to the logic of using c2x5han?


 Thank you, Shawna




-- 
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 do I keep the values of objects when refreshing page?

2001-06-28 Thread Jason k Larson

Please be more specific.

Hector M Banda [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 My page is getting the values and the submits itself displaying the
 information but the original selection is gone showing the objects with
 no info.


 Thanks,


 --


 ===
 Hector M Banda
 Fax: (425) 790-6379

 ===

 --
 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] MySQL Error???

2001-06-28 Thread Christian Sandfeld

Brian,

Sounds to me as if the field you have as primary key is set to type
'TINYINT'. TINYINT's 'signed' range accepts values from -128 to 127, when
set to 'unsigned' it accepts values from 0 to 255.

In your place I would concider changing that column to a 'SMALLINT' and set
it to 'unsigned'. This will allow for values from 0 to 65535 (depending ofc.
on how many digits you set as the max display size).

Hope I helped :)

/Christian

-Original Message-
From: Brian Grayless [mailto:[EMAIL PROTECTED]]
Sent: 27. juni 2001 18:24
To: PHP DB list (E-mail)
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
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] static or dynamic printer-friendly webpages?

2001-06-28 Thread olinux

hmmm, let me think about this.

unless you are crazy you will choose your to stay dynamic. Can you imagine
keeping track of new records... let's click the PF version so I can print
this... What the hell! Shawna I can't print this damn thing. This link
doesn't work. blah blah... It only gets worse I'm sure. I would try doing
something with CSS... then you may even decide to change the other template.

:)

olinux

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 3:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] static or dynamic printer-friendly webpages?


Question for all you php experts out there:

My organization's website is based on mysql/php backend - 95% of the
webpages are generated dynamically using templates and database records.

We have been asked to create printer-friendly versions of these pages.

Now for your opinion/advice: should we (1)create another template called
print.php for example and generate there print friendly pages dynamically
or should we (2)create static html copies of each database record so that
they are print friendly?

By print friendly I mean I want a page that doesn't have the text cut off
the right hand side of the page (nevermind, for now, that the original page
shouldn't do this
in the first place :) )

Thank you so much for your help!

- Shawna


_
Do You Yahoo!?
Get your free @yahoo.com address at http://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] delay script

2001-06-28 Thread Jennifer Arcino Demeterio

hello!

does anyone knows how to delay a display of a certain page ... for example,
if i will click on logout button, it will show a page which will say
logging out then after 5 seconds it will redirect to the login page.


thanks =)




RE: [PHP-DB] Adobc error

2001-06-28 Thread Beau Lebens

Wilmar, it means that a file which is included via the require()
function cannot be found. usually this is because they are doing something
like

require( $ROOT . /the/file/they/want.php);

and you haven't set $ROOT properly, or something like that.
basically, search registro.php for require and check that all the files it
is trying to require can be found.

HTH

Beau

// -Original Message-
// From: Wilmar Pérez [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 28 June 2001 6:48 AM
// To: PHP List
// Subject: [PHP-DB] Adobc error
// 
// 
// Hello guys
// 
// Does anyone know what the following error means and how I can fix it?
// 
// **
// Fatal error: Failed opening required './adodb/adodb.inc.php'
// (include_path='.:/usr/share/php') in 
// /home/thesis/public_html/registro.php
// on line 7
// 
// 
// Thanks a lot
// ---
// Wilmar Pérez
//  IT Manager - Central Library
//  University of Antioquia
//Medellín - Colombia
//   tel: ++57(4)2105145
// ---
// 
// 
// -- 
// 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] mysql errors .... or php errors ????

2001-06-28 Thread Steve Brett

i know this may not be stricktly php but ...

soemtimes when i return queries from mysql to php i get errors like

'invalid index test assumed 'test' in test.php at line 13'  can't
remember the exact syntax but that's the general idea.

if i quote the var when i reference it the error goes away. like
$arow['test'] as opposed to $arow[test].
so in general i quote them always BUT i tried to set up a php members board
on my server yesterday using someones elses code (blazeboard) and got
hundreds of these errors whihc leads me to believe it's either my php or
mysql setup ...

any help would be greatly appreciated.

cheers,

Steve


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

2001-06-28 Thread Steve Brett

you need to find adodb.inc.php and then check that the path in the include
statement on line 7 in adodb.inc.php is pointing at the correct path.

Steve

 -Original Message-
 From: Wilmar Pérez [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2001 23:48
 To: PHP List
 Subject: [PHP-DB] Adobc error
 
 
 Hello guys
 
 Does anyone know what the following error means and how I can fix it?
 
 **
 Fatal error: Failed opening required './adodb/adodb.inc.php'
 (include_path='.:/usr/share/php') in 
 /home/thesis/public_html/registro.php
 on line 7
 
 
 Thanks a lot
 ---
 Wilmar Prez
  IT Manager - Central Library
  University of Antioquia
Medelln - Colombia
   tel: ++57(4)2105145
 ---
 
 
 -- 
 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] delay script

2001-06-28 Thread Jason k Larson

You may find that the HTML meta tag can help you there.





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

2001-06-28 Thread Jason k Larson

sorry so brief earlier .. anyway this is a working sample

meta http-equiv=refresh content=5;url=http://www.php.net;





-- 
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] static or dynamic printer-friendly webpages?

2001-06-28 Thread Jason k Larson

I would recommend staying as dynamic as possible.

To answer your question, yes, another simple template (one designed to be
friendly to printers) would easily work to do what you need.  PDF is an
interesting option but a lot of work and the clients/customers would need to
ensure having the proper plug-ins for their browsers (a bit of a headache,
if you asked me, but can none the less be done).

Good Luck!

Jason k Larson



-- 
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] mysql errors .... or php errors ????

2001-06-28 Thread Jason k Larson

Another thought came to mind.

These errors could be the result of verbose error reporting by PHP.
php.ini or a script could be setting error reporting high enough to display
these errors, however it's extremely poor PHP coding syntax to not correctly
quote everything (except constants, of course).  One might decide to resolve
these errors once and for all by applying single or double quotes on all
named Array indexes.

For the short term you may look into error_reporting() in php.

Jason k Larson



-- 
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] static or dynamic printer-friendly webpages?

2001-06-28 Thread Markus Fischer

I use a method combining both; I first write a so-called
'print.php' which has the ability to write a outputted page to a
disk cache on the disk. So pages are only generated the first
time they're accessed;  on second and further requests they're
serverd directly from the cache (disk in my case).

HTH,
Markus

they're accessed 
On Wed, Jun 27, 2001 at 06:13:25PM -0400, [EMAIL PROTECTED] wrote : 
 Question for all you php experts out there: 
 
 My organization's website is based on mysql/php backend - 95% of the
 webpages are generated dynamically using templates and database records. 
 
 We have been asked to create printer-friendly versions of these pages. 
 
 Now for your opinion/advice: should we (1)create another template called
 print.php for example and generate there print friendly pages dynamically
 or should we (2)create static html copies of each database record so that
 they are print friendly? 
 
 By print friendly I mean I want a page that doesn't have the text cut off
 the right hand side of the page (nevermind, for now, that the original page
 shouldn't do this 
 in the first place :) ) 
 
 Thank you so much for your help! 
 
 - Shawna 

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

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

2001-06-28 Thread Markus Fischer

Seems you're missing the file 'adodb.inc.php' in any of your
include paths, namely '.' and '/usr/share/php'.

Either extend the include_path directive in php.ini to make sure
adodb.inc.php is in the include path or copy the fileto an
appropriate directory.

HTH,
Markus

On Wed, Jun 27, 2001 at 05:47:36PM -0500, Wilmar Pérez wrote : 
 Hello guys
 
 Does anyone know what the following error means and how I can fix it?
 
 **
 Fatal error: Failed opening required './adodb/adodb.inc.php'
 (include_path='.:/usr/share/php') in /home/thesis/public_html/registro.php
 on line 7
 
 
 Thanks a lot
 ---
 Wilmar Pérez
  IT Manager - Central Library
  University of Antioquia
Medellín - Colombia
   tel: ++57(4)2105145
 ---
 
 
 -- 
 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]
 

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

-- 
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 Code in a db?

2001-06-28 Thread Leo de Kleijn

It's possible. Store the function as a text field, retrieve it and use
eval($fieldvalue);

 Hey there,
 Is it possible to store code like a function, for example, in a mysql
 database and pull it into a php dynamicallly so you can use the function
if
 needed?

 Mark


Leo


-- 
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] Dbase function problem AGAIN !!!

2001-06-28 Thread Bartek Pawlik

Why noone answer ?

Hi
My problem is
I have dbf file, I get one record, one of the record's filed is binary (32 b
its). The function dbase_get_record cut Least Sagnificant Bit from this file
, I of course I get wrong value. Can anyone help me? Is there sth wrong with
function?

Thax in advance
Barteks



-- 

Jezdzisz konno?
Ten konkurs jest dla Ciebie! [ http://konkursy.onet.pl/emarket2/ ]


-- 
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] MySQL Error???

2001-06-28 Thread Andreas D. Landmark

At 27.06.2001 17:24, Brian Grayless wrote:
Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

It's a code error, not MySQL.

Duplicate entry means that there already is an entry with value '127' for 
key '1'.
Check whether there are some stale bookmarks in your db (use auto_increment
instead).
Also check your code for any errors around the insert statement... 
codesnipplets
would be fine if you want the list to track this down...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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] static or dynamic printer-friendly webpages?

2001-06-28 Thread Andreas D. Landmark

At 27.06.2001 23:13, [EMAIL PROTECTED] wrote:
Question for all you php experts out there:

My organization's website is based on mysql/php backend - 95% of the
webpages are generated dynamically using templates and database records.

We have been asked to create printer-friendly versions of these pages.

Now for your opinion/advice: should we (1)create another template called
print.php for example and generate there print friendly pages dynamically
or should we (2)create static html copies of each database record so that
they are print friendly?

By print friendly I mean I want a page that doesn't have the text cut off
the right hand side of the page (nevermind, for now, that the original page
shouldn't do this
in the first place :) )

Thank you so much for your help!

Depends how large your ogranization's website is.
I'd definatly go with the dynamic one, that means creating one template and
nothing else (appart from updating the other templates to have a 
PrinterFriendly
link on them).
While a static page would require updating every time something changes, and
requires an amount of work proportional to the number of pages, which could
create a living hell somewhere down the line, especially if you have more than
one webmaster.

*dynamic-dynamic-dynamic* ;-)


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
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] Modify Query, or sift through results?

2001-06-28 Thread Jason Stechschulte

On Wed, Jun 27, 2001 at 08:54:04AM -0500, Joseph Koenig wrote:
 I've got a script that searches a db every night and sends out e-mail if
 it finds something a person would be interested in, based on criteria
 they gave us. The problem is that I have one field that stores regions
 of the country in a very unpleasant way. It stores them as:
 
 Northeast;West;South
 
 So all of the regions for one record go into one field. The problem is
 that when searching that, if someone has a preference  of 'North', I
 dont want to pull records that have 'Northeast', as would happen with
 the above example. Is there a way to modify the MySQL query so as to
 find only 'North', keeping in mind that 'North' may be the 3rd in a list
 of semi-colon separated regions? Or do I need to sift through the
 results in PHP to clean them up? Thanks,

You can certainly have MySQL do the work.  I can't modify your query,
because you didn't give it to us, but I can give you an example.

?php
$sql = select * from your_table where your_column rlike North(;|$);
?

This will do a regular expression match.  If either North with a semicolon
directly after it or North and the end of the string is found, the
row will be returned.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
If you're going to define a shortcut, then make it the base [sic] darn
shortcut you can.
 -- Larry Wall in [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] MySQL Error???

2001-06-28 Thread biorn

Most likely, your id (index, auto-increment field, whatever it is) data type
is tinyint which only goes to 127.


Brian Grayless [EMAIL PROTECTED] said:

 Is anyone familiar with this MySQL error?

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

 Thanks,

 B R I A N   G R A Y L E S S
   Web Administrator
   Premier Resorts
   www.premier-resorts.com

 P: 435-655-4812
 F: 413-618-1518


 --
 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] MySQL Error???

2001-06-28 Thread Saul Diaz Carrillo

Hi
You create a unique index (i think primary) an try to enter a key that is
already in the table.

greetings saul
- Original Message -
From: Brian Grayless [EMAIL PROTECTED]
To: PHP DB list (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 12:24 PM
Subject: [PHP-DB] MySQL Error???


 Is anyone familiar with this MySQL error?

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime
I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

 Thanks,

 B R I A N   G R A Y L E S S
   Web Administrator
   Premier Resorts
   www.premier-resorts.com

 P: 435-655-4812
 F: 413-618-1518


 --
 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] MySQL Error???

2001-06-28 Thread Paul Burney

on 6/27/01 9:24 AM, Brian Grayless at [EMAIL PROTECTED] wrote:

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

It looks like you set your key column as a TINYINT type rather than say, an
INT.  Try ALTER'ing that column type to INT and see if it works.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster  Open Source Developer
UCLA - GSEIS - ETU
(310) 825-8365
[EMAIL PROTECTED]
http://www.gseis.ucla.edu/
++



-- 
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] MySQL Error???

2001-06-28 Thread Jason Stechschulte

On Wed, Jun 27, 2001 at 10:24:13AM -0600, Brian Grayless wrote:
 Is anyone familiar with this MySQL error?
 1062: Duplicate entry '127' for key 1

The error means you are attempting to put a second record in with the
value of 127.

 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

I have one idea.  The column is probably a signed tinyint.  tinyints have
a range of -128 to 127.  When you try to put in anything over 127, the
value is out of range, and so apparently tries to reinsert it as 127.

You could change the column to an unsigned tinyint, which would give you
a range of 0 to 255.  Or an unsigned smallint, which gives you a range
of 0 to 65,535.  Just make sure the column is unsigned, since I doubt
you will be storing negative numbers in the column.  This can be done
easily from the mysql client:

alter table your_table modify your_column smallint unsigned;
-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
/* This bit of chicanery makes a unary function followed by
a parenthesis into a function with one argument, highest precedence. */
 -- Larry Wall in toke.c from the perl source code

-- 
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] mssql_xxx() and characters

2001-06-28 Thread Karl Henrik Peterson

I tried different solutions and it has led me to suspect a
something-or-another in mssql_query() function. However, the problem could
originate from mssql_connect() or mssql_select_db() as well since there is
no way I can verify otherwise, unless I start debugging. And debugging is
exactly what's on the menu next.

Still, has anyone come across the same problem or the lack of the problem?

A correction would be in order as well. Since I thought it was weird of *it*
to replace some chars with two (e.g.. ä with ,, as I recall mentioning)
I double checked that. Actually, of course, its replaced by one char, in
this case the lower quotation marks which look like two consequent commas.
Sry for that.

Thanks,

Karl.


-- 
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] Which state and country?

2001-06-28 Thread Lisa Elita

Hi all,

How can we know from which state and country a hit came?

Regards,
Lisa Elita



-- 
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] Executing several PHP scripts simultaneously??

2001-06-28 Thread Lisa Elita

How can we execute several PHP scripts simultaneously inside a single PHP
script?
For example, let's say master.php has 10 tasks in different PHP scripts:
1.php, 2.php, ..., 10.php. Each task is independent (the input of each task
is not determined by other tasks) so we can do the tasks in any order. But
if 2.php is initiated after 1.php is done, and 3.php is initiated after
2.php is done, and so on, the master.php can be expired, causing the
remaining tasks not executed. So how can we execute these PHP scripts
simultaneously?

Regards,
Lisa Elita


-- 
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] MySQL Error???

2001-06-28 Thread Mark Roedel

 -Original Message-
 From: Brian Grayless [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 27, 2001 11:24 AM
 To: PHP DB list (E-mail)
 Subject: [PHP-DB] MySQL Error???
 
 
 Is anyone familiar with this MySQL error?
 
 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, 
 but everytime I insert bookmarks, I insert somewhere over 120
 and I start getting this error, and it won't add them anymore. 
 Any suggestions???

The error message is telling you that you have a key field defined
(that is, a field that must uniquely identify a row in your database),
and that you're trying to insert a row that has a value in that field
that you've already used.

Given that everything seems to work until you get to 127, I'd venture to
guess that it might be an autoincrement column of type 'tinyint'.  If
that's the case, consider changing it to a type with a higher capacity
(see http://www.mysql.com/doc/C/o/Column_types.html for more
information).  If not, then perhaps we might be able to provide more
useful suggestions if you could give a little more information about
your database structure and the source for the part of the program
that's causing problems...


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
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] php_sybase_ct.dll and libct.dll

2001-06-28 Thread Karl Henrik Peterson

Hi!

After enabling Sybase extensions, PHP complains about not being able to find
the extension dll php_sybase_ct.dll. Yet, paths and stuff are all correct
and the file is exactly where PHP is looking for it. After restarting web
server service PHP starts to complain about libct.dll as well, which I could
not find on my system. What and where is that? Search in zend.com reveals
nothing.

TIA

Karl.


-- 
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] Sybase extensions for MSSQL??

2001-06-28 Thread Karl Henrik Peterson

Greetings,

Would Sybase extensions for php work for MSSQL7?
They say mssql_xxx is an alias for sybase_xxx.
(I desperately need to get smth. working)

Karl.


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

2001-06-28 Thread Attila Strauss

http://www.php.net/sleep


 hello!

 does anyone knows how to delay a display of a certain page ... for
example,
 if i will click on "logout" button, it will show a page which will say
 "logging out" then after 5 seconds it will redirect to the login page.


 thanks =)


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

2001-06-28 Thread Markus Fischer

On Thu, Jun 28, 2001 at 11:09:47AM +0800, Jennifer Arcino Demeterio wrote : 
 hello!
 
 does anyone knows how to delay a display of a certain page ... for example,
 if i will click on logout button, it will show a page which will say
 logging out then after 5 seconds it will redirect to the login page.

1) Use meta REFRESH Tag (search google)
2) Use JavaScript (see setTimeout func or so)

prefer #1

- Markus

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

2001-06-28 Thread Dobromir Velev
Hi,
You can do this without using a php script
why don't you use

META HTTP-EQUIV="refresh" CONTENT="N;URL=http://www.foo.com/foo.html"

where "N" represents a discrete time interval in seconds.

Dobromir Velev

-Original Message-
From: Jennifer Arcino Demeterio [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Thursday, June 28, 2001 4:46 PM
Subject: [PHP-DB] delay script


hello!

does anyone knows how to delay a display of a certain page ... for example,
if i will click on "logout" button, it will show a page which will say
"logging out" then after 5 seconds it will redirect to the login page.


thanks =)


--
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] Modify Query, or sift through results?

2001-06-28 Thread Joseph Koenig

Ah ha..now it looks like we're on to something. I had to modify it a
bit, but it worked...for the most part. I had to make it rlike
North[;|$]. But here's the next problem...I have a region 'Midwest'
and 'Upper Midwest'. When I do this search for Midwest, I get the 'Upper
Midwest' results also. So I tried rlike [^|;]Midwest[;|$] which
returned no results. If I'm thinking correctly, that should be saying:

Find the beginning of a string, or a semicolon, then Midwest, then a
semicolon, or the end of a string.

Is that correct? Thanks,

Joe

Jason Stechschulte wrote:
 
 On Wed, Jun 27, 2001 at 08:54:04AM -0500, Joseph Koenig wrote:
  I've got a script that searches a db every night and sends out e-mail if
  it finds something a person would be interested in, based on criteria
  they gave us. The problem is that I have one field that stores regions
  of the country in a very unpleasant way. It stores them as:
 
  Northeast;West;South
 
  So all of the regions for one record go into one field. The problem is
  that when searching that, if someone has a preference  of 'North', I
  dont want to pull records that have 'Northeast', as would happen with
  the above example. Is there a way to modify the MySQL query so as to
  find only 'North', keeping in mind that 'North' may be the 3rd in a list
  of semi-colon separated regions? Or do I need to sift through the
  results in PHP to clean them up? Thanks,
 
 You can certainly have MySQL do the work.  I can't modify your query,
 because you didn't give it to us, but I can give you an example.
 
 ?php
 $sql = select * from your_table where your_column rlike North(;|$);
 ?
 
 This will do a regular expression match.  If either North with a semicolon
 directly after it or North and the end of the string is found, the
 row will be returned.
 
 --
 Jason Stechschulte
 [EMAIL PROTECTED]
 --
 If you're going to define a shortcut, then make it the base [sic] darn
 shortcut you can.
  -- Larry Wall in [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]