[PHP-DB] A text file include ?

2002-03-25 Thread Dave Carrera
Hi All, I know how to include the contents of a test file into my app. But at the moment I have to type in tags to make in render properly. Is there a way of reading the contents and dynamically creating paragraph breaks or line breaks? Dave Carrera Php Developer http://da

Re: [PHP-DB] A text file include ?

2002-03-25 Thread Marius Ursache
Dave Carrera a écrit : > Hi All, > > > > I know how to include the contents of a test file into my app. > > > > But at the moment I have to type in tags to make in render > properly. > > > > Is there a way of reading the contents and dynamically creating > paragraph breaks or line breaks? > >

RE: [PHP-DB] A text file include ?

2002-03-25 Thread Peter Lovatt
hi try nl2br hth Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 --- > -Original

[PHP-DB] Comparing Strings

2002-03-25 Thread John Fishworld
Whats the best way to compare 2 strings (city names - one in db one user entry) At the moment I'm thinking to do the following ; strip spaces convert to lower and then compare ! Has anyone got any better/other suggestions ?? regards John -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] HELP ME PLEASE: php not run on IIS 4.0

2002-03-25 Thread Berlina
Hi, Im trying to install PHP 4.1.2 under Windows 2000 Server and IIS 4.0 * If I configure PHP as a MODULE, all run but SESSIONS DON'T WORK * If I configure PHP as a CGI, SESSIONS WORK but ORACLE MODULE for PHP not load Any ideas? Anybody can help me? Advanced thanks, Berli -- PHP Database Ma

Re: [PHP-DB] Comparing Strings

2002-03-25 Thread Henrique Flach Latorre Moreno
You could use the eregi() using regular expression, it's probably the best way see how 2 use in the http://www.php.net At 11:59 25/03/02 +0100, you wrote: >Whats the best way to compare 2 strings (city names - one in db one user >entry) >At the moment I'm thinking to do the following ; > >strip s

Re: [PHP-DB] Comparing Strings

2002-03-25 Thread Andrey Hristov
If using mysql then the string comparison of fields is case insensitive except if the (var)char column is BINARY. AFAIK mysql has support for RegEx-es. If you decide to use PHP, then use preg_match/replace but with 'i' modifier. This will make the search case-insensitivi and will be faster than

[PHP-DB] 2 related ?'s email & users

2002-03-25 Thread Dave Carrera
Hi All I hope you can shed some light on the logic behind these 2 issues. 1) How do I make an email verify type of thing? So user enter there email address as part of the sign up process and we send an email to that address. That bit I've got. But how do you check the reply to the ad

RE: [PHP-DB] 2 related ?'s email & users

2002-03-25 Thread Rick Emery
There's a bunch of ways to accomplish what you request. Therefore, I'll offer what I would do. Other folks, more brilliant than, will provide better ideas. 1. Do you have access to the mail server? For instance, I run qmail on my SOHO system and, therefore, have full sys-admin rights. If yo

[PHP-DB] oracle 8.1.7 and php 4.1.2 problems

2002-03-25 Thread V.T.Marvin
Hi, can somebody help me with my problem? I am out of any ideas right now / after two days of trying... Compiling PHP 4.1.2 with oracle support (8.1.7.0.1) on Debian Linux (potato 2.2r5) already compiled Apache 1.3.24 with DSO support... when compiled without oci8 PHP runs fine when compiled wi

RE: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-25 Thread Andrew Hill
Bruce, I'm not sure what you are trying to do - could you clarify? You may be able to simply use the OpenLink Rules Book to set role-based authentication on domain, ip, application, etc. Also, the ODBC Driver version (1.5) you are using is _very_ old and unsupported. I suggest you upgrade to 4.2

Re: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-25 Thread Bruce S. Garlock
Sure, I'm simply trying to have PHP pass an ApplicationID to the ODBC server. When a PHP script access the ODBC database, it does not set the application: 10:46:04 connectopts= user=webuser opsys=unix machine=linux application= As you can see, application= is NULL. I would like the script to

RE: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-25 Thread Andrew Hill
Hi Bruce, The setoption error is being thrown because you cannot use SQLSetConnectOption that way. Passing arbitrary info to be used by your application isn't really what this is for, but instead can be used to modify parameters in the ODBC API. This means you can modify things like SQL_ACCESS_M

Re: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-25 Thread Bruce S. Garlock
I was thinking of using the usernames, but as people come and go, that might mean messing around with the oplrqb.ini file too much. I'd really like to do this based on application. What variable do I pass with the PHP script? ( I'm not sure what you mean ). Can I use a variable in PHP that pas

[PHP-DB] RE: Creating a good search engine

2002-03-25 Thread Andrew Chase
You might want to check out this article on Webmonkey: http://hotwired.lycos.com/webmonkey/97/16/index2a.html?tw=programming The article uses Perl, but the concepts are easy enough to translate to PHP. :) -Andy > -Original Message- > From: Mike de Libero [mailto:[EMAIL PROTECTED]] > Se

[PHP-DB] MSSQL and cyrilic symbols ...

2002-03-25 Thread Nikolay Todorov
I have this problem mssql_query - returns DOS format strings and this changes my cyrilic data result from text fields. with mysql_query - no prolem (on MySQL DB of cource) -- Nikolay Todorov -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] delete statement question

2002-03-25 Thread Andrés Felipe Hernández
Hi, I hope you can help me with this: I have these 3 tables. exam ( exam_id ) questions ( question_id exam_id ) answers ( answer_id question_id ) I am wondering if i can delete all the rows for answers linked to a given exam using only one delete statement.

Re: [PHP-DB] delete statement question

2002-03-25 Thread Bill Morrow
On Mon, Mar 25, 2002 at 02:42:08PM -0800, Andr?s Felipe Hern?ndez wrote: > Hi, I hope you can help me with this: > > I have these 3 tables. > > exam ( > exam_id > ) > > questions ( > question_id > exam_id > ) > > answers ( > answer_id > question_id > ) > >

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
if you are using mysql 4.x, you might try: DELETE answers FROM exam e, questions q, answers a WHERE a.question_id=q.question_id && q.exam_id=e.exam_id; I've not tested this, though. -Original Message- From: Andrés Felipe Hernández [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
this solution will not work for mysql databases, as mysql does not support sub-selects -Original Message- From: Bill Morrow [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:02 PM To: Andr?s Felipe Hern?ndez Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] delete statement question O

[PHP-DB] I have been trying to introduce data in a MySQL database but I don't achieve it.

2002-03-25 Thread Sergio Cornejo
Hi. I have been trying to introduce data in a MySQL database but I don't achieve it. I work with MySQL 3.23.47 for windows 98, Apache 1.3.23 for windows and PHP4. The form code: Nombre: Empresa:

RE: [PHP-DB] I have been trying to introduce data in a MySQL database but I don't achieve it.

2002-03-25 Thread Rick Emery
First: what error are you getting? Second, make your code more readable and easier to debug: $query = "INSERT INTO usuario (USU_USUARIO, USU_CLAVE, USU_NOMBRE, USU_EMPRESA, USU_DIRECCION, USU_TELEFONO, USU_CIUDAD, USU_DEPARTAMENTO, USU_PAIS, USU_EMAIL, USU_REPCLAVE, USU_TIPCLIENTE)". VALUES ('$C

Re: [PHP-DB] delete statement question

2002-03-25 Thread Andrés Felipe Hernández
Rick, thanks for the idea but actually it wouldnt work :( take a look: mysql> delete answers -> from exam e, questions q, answers a -> where a.question_id=q.question_id and q.exam_id=e.exam_id; ERROR 1064: You have an error in your SQL syntax near 'answers from exam e, questions q, exam_

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
Per my original email; you must be running MYSQL 4.0 or later. If you are runnig version 3.x, as it appears you are, then this suggestion will NOT work -Original Message- From: Andrés Felipe Hernández [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 5:59 PM To: [EMAIL PROTECTED]

[PHP-DB] Re: Speed Up Code?

2002-03-25 Thread Lutz Brückner
Hi Jeff, the most important rule you should follow: don't query the database in a loop to avoid a join! The following lines (maybe some changes are necesary) will do the same job as your code, but considerable faster. Especially if 'id' is an index in both tables. Lutz $sql = 'SELECT u.id, u.

[PHP-DB] Looking for Experienced PHP Programmers

2002-03-25 Thread Jeffrey Cleary
Hi all. My apologies if this is the wrong list. My company, JeffreyCo, Inc., is looking for one or two experienced PHP Programmers familiar with MySQL and a Linux environment for short term project work. Qualified candidates should send their resume, complete with links to any current applicati

RE: [PHP-DB] Re: Speed Up Code?

2002-03-25 Thread Jeff Oien
Fantastic! I'm going to have to study the code more to really understand it. Thanks for the help. I had to change the code just a little for it to work: $sql = "SELECT u.id, u.username, u.album_title, date_format(MAX(f.date), '%b %D, %Y') as date1, COUNT(*) AS cnt FROM Chart_Users AS u INNER JO

[PHP-DB] procedures?

2002-03-25 Thread Chris Payne
Hi there, Where can I find information in PLAIN terms about how to use procedures in MySQL? More importantly I want to be able to write my own so I don't have to keep re-using the same code in the way that I do now to access, delete etc from db's. Thank you :-) Chris

RE: [PHP-DB] ODBC -- Setting ApplicationID

2002-03-25 Thread Andrew Hill
Bruce, It looks like you were on the right track initially, the problem is that PHP has a major bug - odbc_setoption is coded specific to ODBC statement handle (connection id), which means that trying to use odbc_setoption the way you want attempts to set a SQLSetConnectOption AFTER the connectio

[PHP-DB] File Upload

2002-03-25 Thread David McInnis
I wrote s script to upload a file. The script works, but when I point my browser to the file it downloads, but I can no longer open the file in MS Word. What is happening to my file? My client is Windows and the server is Linux. David McInnis -- PHP Database Mailing List (http://www.php.n

[PHP-DB] If else Question

2002-03-25 Thread Jennifer Downey
Hi all, I have a table called pets, here is a partial dump: At this time this is all I am working with. uid int(10) NOT NULL default '0', num_pet tinyint(1) NOT NULL default '1', There are three steps to adding the pet into the db Step 1 create the record, this is in create.php. And yes b

[PHP-DB] Suscribtion

2002-03-25 Thread David JURAS
I'd like to suscribe with [EMAIL PROTECTED] , and your confirmation e-mail doesn't seem to work. Thanks, David