[PHP-DB] REQ code help for case statement

2002-01-15 Thread George Pitcher
Hi all, Trying to move code into MySQL rather than php, but can't find any examples of what I want to do. I have a number of fields and want to be able to check a number of fields (most containing workflow dates or text) and return a 'message' for web display. The message will take the form of

[PHP-DB] Replacing * with %

2002-01-15 Thread Markus Lervik
Hello all! I can't for the love of god get neither ereg_replace nor str_replace to work. I wan't to replace * with % so I can use SELECT ... WHERE whatever LIKE string% in MySQL. I've tried ereg_replace(*,%,$search_name). Didn't work. I tried escaping the asterisk. I tried double-escaping the

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
/* sorry markus, forgot to post this to the list, so here it is again! */ don't know if this is the solution without doing some reading, so i'll tell you what i think it might be and you can read up on it! is either (or both?) * and % special characters in regular expressions? if so, it may be

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
just checked it out, and * is a special character unless enclosed in class brackets. so using [*] should hopefully work! give it a go and see. cheers, Matt -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: 15 January 2002 09:54 To: [EMAIL PROTECTED] Subject: RE:

[PHP-DB] Including a file using php //

2002-01-15 Thread louie miranda
Hi, I was trying to include a url file on another server but could't make this to work. It displays nothing actually.. ?php $retvalue = include('http://192.168.129.103/noc/chikkaps.txt'); echo $retvalue; ? Can someone help me please? thanks, louie... -- PHP Database Mailing List

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread Rosser, Chris
The following works fine for me: $currentword = ereg_replace(\*,%,$currentword); Chris }:) -Original Message- From: matt stewart [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 9:57 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Replacing * with % just checked

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
excellent! two ways to do it - Markus confirmed that [*] works too - so don't know which is better, but we have two solutions anyway. -Original Message- From: Rosser, Chris [mailto:[EMAIL PROTECTED]] Sent: 15 January 2002 10:54 To: '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Replacing *

Re: [PHP-DB] Replacing * with %

2002-01-15 Thread Bruno Gimenes Pereti
Hi Markus, I think you forgot to assign the value of ereg_replace to a variable. I made this test and it worked: ? $t = 'abc*cde*'; printf(%s\n, ereg_replace(\*, \%, $t)); // or $result = ereg_replace(\*, \%, $t); ? Hope it helps, Bruno Pereti. - Original Message - From: Markus

[PHP-DB] A local file copy question

2002-01-15 Thread Dave Carrera
I am trying to copy a file on my system from one local place to the path of my script. So... FILE TO COPY = c:\dir\filename.php COPY TO = ../dir/filename.php I need to work out how to determin the local path of my script thus allowing my script to know where ../dir is relitive to. I Think

Re: [PHP-DB] Including a file using php //

2002-01-15 Thread Markus Lervik
On Tuesday 15 January 2002 12:35, you wrote: Yes it work's on local / but how about when the file comes from a remote server? ### works ?php $file = one.php; include($file); ? ### ### did not work at all ?php $file = http://192.168.129.103/noc/chikkaps.txt;; include($file); ? ###

Re: [PHP-DB] Problem with mail function

2002-01-15 Thread Jon Farmer
Hi Faye Maybe I shouldn't be trying to send that many emails at a time. I am on apache using mysql and php... -- put the line set_time_limit(0); at the top of your PHP script Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key

[PHP-DB] mail() on Mac OS X

2002-01-15 Thread Adam Royle
I have been trying for months now (on and off) to get mail() working in OS X. I have trid various things, but this is my current setup. If you have any suggestions or if you could put me in the right direction, then I would be glad. - I am using PHP v4.0.6 on Mac OS X 10.1 (pre-compiled with

[PHP-DB] MySQL/PHP and the case of Good Lord, that's a lot ofstatements

2002-01-15 Thread Tobyn Baugher
Hi All, Normally I try not to take work home with me, mainly because I'm good enough at breaking my own code. In this case, however, I think it might be a good idea if I knew the answer to the question I was asked. Basically, there's a PHP script. This script is a rather kludgy way of

Re: [PHP-DB] Combining INSERT...SELECT and INSERT INTO

2002-01-15 Thread Tobyn Baugher
On 1/14/2002 12:54 PM +0200 Markus Lervik wrote: Is there any way to combine INSERT...SELECT and INSERT INTO so one could insert a new row with a few values inserted by hand and others from another table? something like INSERT INTO mag_table (mag_id,issn,year,info,volume,numbers,remarks)

[PHP-DB] Re: MySQL/PHP and the case of Good Lord, that's a lot of statements

2002-01-15 Thread Hugh Bothwell
The problem is, somewhere in the middle of this script (more like closer to the beginning) the script just *dies*. I say that because there's no error message, no warnings, no footer content that's included after the processing is done, nothing. It just dies in the How long does this take

Re: [PHP-DB] Re: MySQL/PHP and the case of Good Lord, that's alot of statements

2002-01-15 Thread Tobyn Baugher
On 1/15/2002 9:17 AM -0500 Hugh Bothwell wrote: How long does this take to run? Could it be timing out? Well, it's echo-ing each statement it's executing (added later to help debug), so from a connection standpoint I don't think it's timing out. None of the browsers seem to think it is, at

[PHP-DB] Re: WebMail

2002-01-15 Thread Jerry
On which platform ? For the webmail program, see: http://www.upenn.edu/computing/group/webmail/2000/ http://www.devshed.com/Server_Side/PHP/PHPMail (email client) Or try: http://sdb.suse.de/en/sdb/html/katlist.SUSEIMAP.html http://hyper-cgi.com/grn/webware.html

Re: [PHP-DB] mail() on Mac OS X

2002-01-15 Thread Paul Burney
on 1/15/02 7:38 AM, Adam Royle at [EMAIL PROTECTED] appended the following bits to my mbox: I have been trying for months now (on and off) to get mail() working in OS X. I - I am using PHP v4.0.6 on Mac OS X 10.1 (pre-compiled with cool options from entropy.ch) - I installed Communigate

[PHP-DB] TNS name problem -php_oracle.dll library

2002-01-15 Thread Enrique Grajeda
Hello, I have the follow problem: I have installed oracle 7.3 client and work right, and I have installed apache and php the last version. When I try to connect to oracle with the libray php_oracle.dll I get the follow message: Oracle: Connection Failed: ORA-12154: TNS:could not resolve

Re: [PHP-DB] Re: MySQL/PHP and the case of Good Lord, that's a lot of statements

2002-01-15 Thread Bruno Gimenes Pereti
Uoh, It's a big one... Some thougths I had while reading your e-mail: - There is an option in php.ini where you can disable error messages (someone wrote to the list, it might be in the archive). And I found in my php.ini now the error_reporting option, maybe you could set it to E_ALL to see if

Re: [PHP-DB] Moving from MySQL to MSSQL Server 2000

2002-01-15 Thread Gabriel Ricard
Sorry for the late reply to this, but if you were to move to MS SQL I'd highly recommend using FreeTDS (www.freetds.org) to access the database from PHP. Due to the lack of an MS SQL client library in Mac OS X I have to use FreeTDS to contact another MS SQL server ( I use MySQL myself ).

RE: [PHP-DB] Moving from MySQL to MSSQL Server 2000

2002-01-15 Thread Andrew Hill
Hi, You can indeed use ODBC, and that will get around some issues that FreeTDS has with SQLServer 2000. Some ODBC drivers are slow, but you will find OpenLink's drivers to be exceptionally fast. To use ODBC, you will need to link PHP against iODBC as per the howto at www.iodbc.org The drivers

[PHP-DB] crypt and decrypt and xor

2002-01-15 Thread Thomas \omega\ Henning
Hello All, Does PHP have a crypt and decrypt algorithm? Is xor supported by php and can you give me some examples for it? Thanks Thomas omega Henning -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP-DB] crypt and decrypt and xor

2002-01-15 Thread Patrik Wallstrom
On Tue, 15 Jan 2002, Thomas omega Henning wrote: Hello All, Does PHP have a crypt and decrypt algorithm? You have the crypt() function, and more crypto algorithms can be found in the mcrypt package. Is xor supported by php and can you give me some examples for it? $c = $p ^ $k ^ is the

[Fwd: [PHP-DB] A local file copy question]

2002-01-15 Thread Daniel Barton
oops. -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] ---BeginMessage--- Hi, There are several PHP-Apache environment variables that may do what you're interested in. (I'm not

Re: [PHP-DB] passing variable through an html email

2002-01-15 Thread Jason Wong
On Wednesday 16 January 2002 03:32, Kevin Ruiz wrote: This isn't a db related question! I'm writing a page that allows me to add users to a table. Once the users are in the table they will be able to gain access to our downloads section, they will be validated against their user/pass in a

[PHP-DB] mysql_insert_id?

2002-01-15 Thread Wee Chua
Hi, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? Thanks, Wee -- PHP Database Mailing List (http://www.php.net/)

RE: [PHP-DB] passing variable through an html email

2002-01-15 Thread Peter Lovatt
Hi Could it be that your message block starts with ' (single quote) so the variables are not evaluated. Variables are only evaluated when using (double quotes) which does not mix well with HTML. try using $message='text and HTMLtag name=zapit'.$variable.' more text and HTML'; Peter

[PHP-DB] Exporting data

2002-01-15 Thread Ajaya R. Sharma
HI, How do I export the result on my browser received from Sybase using PHP to .rtf/.txt format and save on to my local hard disk? Regards, Ajaya Sharma -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP-DB] mysql_insert_id?

2002-01-15 Thread Paul Burney
on 1/15/02 4:08 PM, Wee Chua at [EMAIL PROTECTED] appended the following bits to my mbox: Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does

[PHP-DB] Logicproblem in WHERE statement

2002-01-15 Thread Andy
Hi there, I am building a user search engine. Now I do not know how to gett following: a mandatory field and a voluntary field For example I would like to get all female users and those who are from canada. The results should show all users who are female regardless of nationality But it

[PHP-DB] How to design a user table with 1 mio entries

2002-01-15 Thread Andy
Hi there, I am having a search engine on á user table. It works fine for a few users. But I asume that it is gonna be realy slow for 1 Million entries. That because I have all parameters in on table and I am doing to select stmt on it. The first one gets all users for storing the ranking, the

[PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread Andy
Hi, I am searching for a good book on how to design a db for web apps. Normalisation rools, performancejust describing how to do it on a proffesional way. The second one, I am searching for is a book about SQL for MySQL. Any good books on the market? Thanx for the recommendation Andy

RE: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread Leotta, Natalie (NCI/IMS)
Any O'Reilly book is always a good choice. O'Reilly is the publisher - they do the Nutshell books and a bunch of others. They are also the books with animals on them, if that helps :-) -Natalie -Original Message- From: Andy [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002

[PHP-DB] FreeBSD 4.2 and ODBC

2002-01-15 Thread Paul G
Hi All, I'm just new to this list and I'm hoping somebody might have information leading to a PHP that can access an MS Excel Spreadsheet. FreeBSD 4.2, PHP 3.0.18 (for gif GD), Apache1.3.12. I have had no luck getting any of the ODBC functions to work with this OS (odbc_connect, php compiled

[PHP-DB] Re: Logicproblem in WHERE statement

2002-01-15 Thread Jaime A. Chavarriaga L.
Andy I am building a user search engine. Now I do not know how to gett following: a mandatory field and a voluntary field For example I would like to get all female users and those who are from canada. The results should show all users who are female regardless of nationality But it

RE: [PHP-DB] FreeBSD 4.2 and ODBC

2002-01-15 Thread Andrew Hill
Paul, You can simply download the binary at www.iodbc.org and configure --with-iodbc as per the HOWTO. If you tried this and then got undefined function then this means you didn't use the correct php binary or somesuch. Ensure that ODBC support is compiled in by examining the output of a

Re: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread DL Neil
Andy (and Natalie), In fact the O'Reilly book on PHP is the exception that might well prove the rule - normally I think them v.good The reference work on MySQL is by Paul DuBois (who often stops by here - hi Paul) and published by New Riders. Unfortunately none of my favorite texts (of the

Re: [PHP-DB] Tricky Quiestion!!!

2002-01-15 Thread Andrés Felipe Hernández
it seems to me that the problem with your encryp' function has to do with your 'separators'. Try replacing every ocurrence of your especial chars ( in this case the values $sep could get ) before using your encrypting function. hope i got it right, andy Thomas omega Henning [EMAIL PROTECTED]

Re: [PHP-DB] FreeBSD 4.2 and ODBC

2002-01-15 Thread Paul G
Thanks Andrew, I will attempt this in the morning. Is it okay with you if I email you on the iODBC stuff? PHP was compiled like so: Configure command: ./configure '--with-apxs=/usr/local/apache/1.3/bin/apxs' '--with-config-file-path=/usr/local/lib' '--with-system-regex' '--enable-track-vars'

Re: [PHP-DB] Problem with mail function

2002-01-15 Thread Faye Keesic
Nope - haven't figured it out, even after sending 50 at a time, and pausing the script for 30 seconds. The page would refresh and do everything over and over and overuntil manually stopped in the browser. I will try that set_time_limit(0); tomorrow. Have had to work on other stuff today.

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

RE: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread Montz, James C. (James Tower)
I found Sams teach yourself MySQL in 21 days to be very helpful. It provides some general db practices such as structure and normalization. And it covers MySQL pretty well, with examples for mutiple languages. -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

Re: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread Bob Hall
On Tue, Jan 15, 2002 at 11:11:25PM +0100, Andy wrote: Hi, I am searching for a good book on how to design a db for web apps. Normalisation rools, performancejust describing how to do it on a proffesional way. The second one, I am searching for is a book about SQL for MySQL. Any good

[PHP-DB] Automatic Listboxes

2002-01-15 Thread Chris Payne
Hi there everyone, Hope you are all having a good new year :-) I have a problem, I am working on a search engine for a Travel Agents and before you get to the actual type-in search field, you have to select from 3 pulldowns. The first pulldown is country, then the second should popuplate from

Re: [PHP-DB] Re: permissions for writing file

2002-01-15 Thread Miles Thompson
James, Who are you logging in as and do you have write privileges in that directory? Who owns it: user and group? (Don't have to answer, that's just what you have to know. Alternately, is there a mysql user in /etc/passwd? What group? The answer probably lies in there somewhere. Is there

Re: [PHP-DB] Automatic Listboxes

2002-01-15 Thread Bogdan Stancescu
You'll have to submit the data. Just that instead of pushing go, you can get JavaScript to do that. For instance, form name=myForm1 action=? echo $PHP_SELF? select name=country onChange=document.myForm1.submit() option value=Albania option value=Andorra /select /form form name=myForm2

Re: [PHP-DB] Why the following error, yet it works anyway

2002-01-15 Thread Miles Thompson
Chip, You're not going to like this .. on the delete you aren't fetching any rows. Miles At 09:18 AM 1/14/2002 -0800, [EMAIL PROTECTED] wrote: I have the following short web page to delete dealer bulletins from a database. My page lists all the bulletins in the database - id and subject. There

Re: [PHP-DB] REQ code help for case statement

2002-01-15 Thread Miles Thompson
George, Maritime Tel Tel, or Aliant as they like to be known as now, has had its email servers screwed up all day. So if this has already been answered, just let me know. I also just had a look at the example in the MySQL manual and it's not a model of clarity. Well, maybe it is, but

Re: [PHP-DB] index page

2002-01-15 Thread Andrés Felipe Hernández
so what's the problem? : ) you should have a link like this: a href=results.php?criteria=?php echo $critera ?max_results=?php echo $max_results ? the link /a now you'll be able to do your query at the results.php script using those variables. andy - Original Message - From: Barry

[PHP-DB] sorting on the first 8 digits....

2002-01-15 Thread John Hawkins
Ok, I did something stupid and now I am paying the price... In an internal database that tracks the time and date something happens on our site, I mistakenly forgot to use leading zeros in the 24 hour column(s). So, anything that happens between 1-9 am are all short by one digit. Now, I need to

RE: [PHP-DB] Automatic Listboxes

2002-01-15 Thread Adam Royle
Javascript is your way to do this, but there are obviously a few ways you can do that aswell. You don't want to have to submit a form and reload images/pages etc, so javascript is the only way to go (or dhtml or other stuff) One way to do this is either with layers (hide/unhide depending on what

[PHP-DB] PHP Build/Compile Problem

2002-01-15 Thread Shahmat Dahlan
I have configured apache according to the readme included in the apache source: ./configure --prefix=/usr/local/apache And then configure php: ./configure --with-apache=../apache_1.3.22 make make install After that configure apache again while activating the php module: ./configure

Re: [PHP-DB] Logicproblem in WHERE statement

2002-01-15 Thread Jason Wong
On Wednesday 16 January 2002 06:05, Andy wrote: Hi there, I am building a user search engine. Now I do not know how to gett following: a mandatory field and a voluntary field For example I would like to get all female users and those who are from canada. The results should show all

[PHP-DB] A weird images database/web page problem

2002-01-15 Thread chip
I have a database set up with tables of images. I have pages set up to display the images 12 per page in a table of 2 rows/6 cols. There is a next link that loads the next 12 images from the database. All works just fine except for one little problem - the first time the page is loaded the

Re: [PHP-DB] A weird images database/web page problem

2002-01-15 Thread Steven Cayford
On 2002.01.15 23:30:25 -0600 chip wrote: I have a database set up with tables of images. I have pages set up to display the images 12 per page in a table of 2 rows/6 cols. There is a next link that loads the next 12 images from the database. All works just fine except for one little

[PHP-DB] Session and authentication questions in frames

2002-01-15 Thread TJayBelt
I have a successful website with authenticatin and logons. There are sections that I allow anyone to get to, but the others have to be authenticated. This site is not using frames at all. its a page by page, with the unit that does the authentication and sessions being included in each page.