[PHP-DB] PHP/mySQL and INSERT statements

2001-08-28 Thread Pyran Firebrand
Hello... I'm trying to enter a fair amount of text into a mySQL database from textfiles using PHP. I'm having some problems, and I hope someone can help me. The table looks like this: Name: rants id : int auto_increment date: varchar(8) category: char(1) title : varchar(75)

RE: [PHP-DB] Accessing fields with the same name in MySQL

2001-08-28 Thread Walter, Marcel
You have two times the field id Look at your query ... especially the Where-Clause .. You only want to show Recordsets where id = id ... = In both columns is the same value ... -Original Message- From: Trevor Lanyon [SMTP:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 20:13

RE: [PHP-DB] Resource ID

2001-08-28 Thread Walter, Marcel
I don´t know what your class does ... but normally queries work like this: open database $qresult = query(select blah,$link_id); // Now, in $qresult is a number with which you can go through your resultset ... // For Example: while ( $Recordset = ezi_fetch_array($qresult) ) { print

Re: [PHP-DB] PHP/mySQL and INSERT statements

2001-08-28 Thread Paul Burney
on 8/27/01 11:32 PM, Pyran Firebrand at [EMAIL PROTECTED] wrote: $query = INSERT INTO rants VALUES (1, '$date', '$type', '$title', '$text'); mysql_db_query($query, $db_link) or die (brProblem!); } You should probably be specifying the database before the $query. By the way, use of the

Re: [PHP-DB] PHP/mySQL and INSERT statements

2001-08-28 Thread Jason Wong
- Original Message - From: Pyran Firebrand [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 2:32 PM Subject: [PHP-DB] PHP/mySQL and INSERT statements Hello... I'm trying to enter a fair amount of text into a mySQL database from textfiles using PHP. I'm having

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Yves Glodt
On Tuesday 28 August 2001 07:43, Todd Cary wrote: I am new to the Linux environment - currently using IIS/PHP/Interbase. What do I need in order to have Interbase running with PHP on a linux 7.1 platform? I have Interbase 6 installed and I have PHP 4.0.4pl1 loaded. The php.ini file has

[PHP-DB] newbie - correct use of Grant in mysql

2001-08-28 Thread Darren Smith
Hello I know this is off topic but I have tried at the mysql newsgroup/mailing list but the just ignored me and you all seem like such nice people :) I am setting up a kind of PHP guestbook that will allow the user to log in and update their details. Should I create a new user using grant for

RE: [PHP-DB] Resource ID

2001-08-28 Thread Craig Vincent
Scott, The resource IDs are integer identifiers PHP uses to identify the different queries being done on the system. However if you want to actually extract the information from those queries you need to use either the mysql_fetch_row() or mysql_fetch_array queries. Oh and on another

[PHP-DB] GET a html page via php....

2001-08-28 Thread Koutsogiannopoulos Karolos
Title: GET a html page via php -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello averyone... i have a question to make and any help is more than welcome... Is there a way to connect with php to a foreign site and retrieve an html page and then to extract a specific value from this

Re: [PHP-DB] GET a html page via php....

2001-08-28 Thread * RzE:
Original message From: Koutsogiannopoulos Karolos [EMAIL PROTECTED] Date: Tue, Aug 28, 2001 at 02:15:56PM +0300 Message-ID: [EMAIL PROTECTED] Subject: [PHP-DB] GET a html page via php Hello averyone... i have a question to make and any help is more than welcome... Is there a way to

RE: [PHP-DB] GET a html page via php....

2001-08-28 Thread Eduardo Vela
I am also interested in this matter... Is there a way to open a file in a site which require usename and password? thks. -Mensaje original- De: * RzE: [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 28 de Agosto de 2001 06:31 a.m. Para: Koutsogiannopoulos Karolos; PHP Database

RE: [PHP-DB] GET a html page via php....

2001-08-28 Thread Ryan Marrs
If it uses basic authentication, you should be able to do: Fopen(http://username:[EMAIL PROTECTED],r;) Ryan Marrs [EMAIL PROTECTED] Web Applications Developer / IT Sandler Travis Trade Advisory Services, Inc. www.strtrade.com 248-474-7200 x 183 -Original Message- From: Eduardo Vela

RE: [PHP-DB] newbie - correct use of Grant in mysql

2001-08-28 Thread Rick Emery
use one account/password for all. Otherwise, when you write your PHP/ASP script, you'd have to have an mysql database open for each guest. MySQL should be able to handle the number of guests that you indicate. For each guest, store their username in the database and a MD5 hash of their

Re: [PHP-DB] GET a html page via php....

2001-08-28 Thread * RzE:
Original message From: Eduardo Vela [EMAIL PROTECTED] Date: Tue, Aug 28, 2001 at 07:48:38AM -0500 Message-ID: 000701c12fbf$c32ba140$[EMAIL PROTECTED] Subject: RE: [PHP-DB] GET a html page via php I am also interested in this matter... Is there a way to open a file in a site which require

[PHP-DB] query question

2001-08-28 Thread L Melville
Hi, If I run a query;- $result = mysql_query($query); is there a way of deleting rows from $result after this runs. Or does anyone have any idea of how $result is generally structured when mysql_query($query) is run. thanks -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] query question

2001-08-28 Thread Dave Watkinson
instead of SELECT all_records WHERE some_condition, and then DELETE certain_rows, couldn't you just do a DELETE FROM WHERE? -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] query question Hi, If I

RE: [PHP-DB] Error in SQL syntax

2001-08-28 Thread Rick Emery
Have you tried typing this SELECT statement directly into MySQL? If not, try it; MySQL may indicate a more precise error. rick -Original Message- From: Alex V.Varavva [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 1:03 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Error in SQL

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
sorry I wasn't very clear, I do not actually want to delete anything from the database, I need to remove some of the query elements before it is used elsewhere (before fetch array ect), but I cannot alter the way the select query works. Dave Watkinson [EMAIL PROTECTED] wrote in message [EMAIL

RE: [PHP-DB] query question

2001-08-28 Thread Rick Emery
What exactly are you trying to do? Do you want to delete certain rows from $result? Or delete ALL rows, in which you'd use: mysql_return_result($result); If you want to delete certain rows, you can't. You just have to make your selection criteria more precise. Then, fetch row by row to weed

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again but with the said rows removed. I am trying to do this to avoid some major code changes with what I am working with. Rick Emery [EMAIL PROTECTED]

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
The only way i could think of doing this is to loop through $result and assign the rows you want to keep to a new array. -- Jon Farmer տլ Systems Programmer, Entanet www.enta.net Tel +44 (0)1952 428969 Mob +44 (0)7968 524175 PGP Key available, send blank email to [EMAIL PROTECTED]

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
yeh this would work, how can I assign the rows to a new array? Is each row accessed as an element? Jon Farmer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The only way i could think of doing this is to loop through $result and assign the rows you want to

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Todd Cary
Many thanks for your answer! However, I have one additional request: how to compile PHP under Linux 7.1? As I said previously, Linux/Unix is new to me and it has been quite a few years since I did any programming with C/C++ - Delphi has been my mainstay for my clients. Could you share with me

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
See http://www.php.net/manual/en/ref.array.php You will need a multi-dimensional array if your resultset has more than one field Regards Jon -- Jon Farmer տլ Systems Programmer, Entanet www.enta.net Tel +44 (0)1952 428969 Mob +44 (0)7968 524175 PGP Key available, send blank email to [EMAIL

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Yves Glodt
On Tuesday 28 August 2001 16:21, Todd Cary wrote: Many thanks for your answer! However, I have one additional request: how to compile PHP under Linux 7.1? As I said previously, Linux/Unix is new to me and it has been quite a few years since I did any programming with C/C++ - Delphi has been

[PHP-DB] Re: Troubles in ODBC Land

2001-08-28 Thread Jonathan Hilgeman
Okay, I uninstalled unixODBC and tried iODBC ( I actually began to try it before, but then thought of something that might work on unixODBC, so I went back to it ). Now iODBC's odbctest application works with myODBC installed. However, after I recompile PHP with iodbc parameters, I try to run

[PHP-DB] Special character on an INSERT statement

2001-08-28 Thread Jorge Giménez Mayorgas
Hi . I'm trying to do this on an INSERT statement. $sql= INSERT (' TONS OF CD'S ') or any phrase with the character ' . Obviously it gives an error when execeting mysql_query. How can I do it ? Thanks, Jorge Giménez

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Todd Cary
Again, many thanks. Your guidance is clear and to the point. I regret that it is as though I just got my first computer :-) !! It has been along time since I wrote Perl scripts and I do not know how to check to see if it is loaded (being a Red Hat install, I would imagine it is on my system).

Re: [PHP-DB] Special character on an INSERT statement

2001-08-28 Thread Andrey Hristov
Use addslashes() when inserting/updating the DB use stripslashes() when extracting. Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: Jorge Giménez Mayorgas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 7:48 PM Subject:

[PHP-DB] How to delete specific row in mysql table?

2001-08-28 Thread Jan Grafström
Hi! I am new to this an wonder how to delete a row in my table. I have tryed with: -- DELETE FROM mytable WHERE 32 - to delete row number 3 but all rows goes away! Thanks in advance for any help. Regards Jan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail:

RE: [PHP-DB] How to delete specific row in mysql table?

2001-08-28 Thread Rick Emery
Your statement is saying: if 3 is greater than 2, delete all Your WHERE criteria should be based upon a specific field's contents, NOT its position in a data base -Original Message- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 11:51 AM To: [EMAIL

Re: [PHP-DB] How to delete specific row in mysql table?

2001-08-28 Thread Jason Brooke
Hi! I am new to this an wonder how to delete a row in my table. I have tryed with: -- DELETE FROM mytable WHERE 32 - to delete row number 3 but all rows goes away! Thanks in advance for any help. Regards Jan That's because the number 3 is greater than the number 2, so is

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Steve
if this is a stock out of the box red hat install, you will need to find the rpm that contains apxs (i forget which one) and install it. For some reason this is not installed by default. Seems like you can do a search on php.net for apxs and come up with the proper rpm name. - Original

[PHP-DB] Error making php with informix

2001-08-28 Thread Muciño Zúñiga Marco Antonio
Hi, I'm trying to install php-4.0.6 in my SCO Unix box but when I run the make command I get the next error: /bin/sh ../libtool --silent --mode=link gcc -g -O2 -o libZend.la -lifsql -lif asf -lifgen -lifos -lifgls -lnsl_s -lcrypt_i -lgen -lsocket -lnsl -lsuds -ltinfo -lprot -lx -ltinfo -lc

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Todd Cary
Steve - I am still trying to find out which RPM I need to install... Many thanks for the help... Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Yves Glodt
On Tuesday 28 August 2001 20:38, Todd Cary wrote: Steve - I am still trying to find out which RPM I need to install... Many thanks for the help... Todd it's a program that came with apache in my distro, it's called apxs i've got it in /usr/sbin/ try locate apxs, if it

[PHP-DB] DBM databases - un-clear

2001-08-28 Thread andy
HELP! I'm trying to use a DBM database as a book i bought discribes. I have copied the example but to no avail. The oly coclusion i ca come to is that i need somethig extra installed, or need to use a specific include. At the moment when i try to use it i get the following error; Fatal

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Steve
This is from php.net (search for apxs): Configure couldn't find apxs. This is because RedHat didn't install it as part of the server option install. Go figure. The solution to a missing apxs script is to install the apache-devel-1.3.12-2.i386.rpm from your RedHat 6.2 install CD, which will put

[PHP-DB] Accessing Oracle 9i locally

2001-08-28 Thread Tom Tsongas
Hi folks. Up til now I have been using PHP code on my NT Server running Apache to access an Oracle 9i database remotely. Everything works fine but now I will be migrating my files to an Apache server on the same machine as the Oracle database. My code currently access the database through TCP/IP

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Todd Cary
Steve - I was able to find the leading part of that message on php.net, but I was unable to get the complete text. Did you search documentation? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

[PHP-DB] ODBC Woes

2001-08-28 Thread Jonathan Hilgeman
Okay, all I need to know is this: Some people say that they can only connect with: odbc_connect(DSN=Datasource;UID=username;PWD=password,,); Others say that doesn't work, and that they can only connect with: odbc_connect(Datasource,username,password); I am confused. I can use the second example

RE: [PHP-DB] ODBC Woes

2001-08-28 Thread Andrew Hill
Nope, it depends on the driver manager you are using, and I believe the first example has been deprecated in nearly all cases. Why do you need to use the first? Just use variables: $dsn=dsnname; $uid=user; $pwd=password; odbc_conenct($dsn, $uid, $pwd) Best regards, Andrew Hill Director of

Re: [PHP-DB] ODBC Woes

2001-08-28 Thread Jonathan Hilgeman
I am attempting to use oPAYc (www.opayc.com) as a central method of payment processing. In order to pass information like different store configs or certificates at runtime, I need to pass them in the DSN string area. I'm using iODBC right now. - Jonathan Andrew Hill [EMAIL PROTECTED] wrote in

Re: [PHP-DB] ODBC Woes

2001-08-28 Thread Yves Glodt
On Tuesday 28 August 2001 22:05, Jonathan Hilgeman wrote: Okay, all I need to know is this: Some people say that they can only connect with: odbc_connect(DSN=Datasource;UID=username;PWD=password,,); Others say that doesn't work, and that they can only connect with:

[PHP-DB] MySQL Persistent connection is TOO persistent???

2001-08-28 Thread Brian Grayless
Gotta problem For some reason, many of my persistent connections aren't terminating. I end up with up to 30 connections to MySQL that aren't being used. My guess is that the user connection is slow and the script never finishes running or something. Is there a way to get all my connections

Re: [PHP-DB] ODBC Woes

2001-08-28 Thread Jonathan Hilgeman
if($TFM_Doesnt_Have_Anything_About_It == 1) { $Shut_Yer_Unhelpful_Trap = 1; $You-RTFM see(); } Yves Glodt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if ($RTFM == 1) { int odbc_connect (string dsn, string user, string password [, int cursor_type]) }

RE: [PHP-DB] ODBC Woes

2001-08-28 Thread Andrew Hill
Jonathan, Passing different configs should be as simple as passing different $dsn values in, and configure the info in your odbc.ini file. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Todd Cary
OK! I now have Linux 7.1, PHP 4.0.6, Interbase 6, and Apache all running thanks to some kind from from all of you. Now the big question that is not within the scope of this forum: What did I really do when I compiled the PHP 4.0.6? Maybe a direct email to me is the best way this can be

Re: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Yves Glodt
On Tuesday 28 August 2001 22:45, Todd Cary wrote: OK! I now have Linux 7.1, PHP 4.0.6, Interbase 6, and Apache all running thanks to some kind from from all of you. Now the big question that is not within the scope of this forum: What did I really do when I compiled the PHP 4.0.6? Maybe

Re: [PHP-DB] MySQL Persistent connection is TOO persistent???

2001-08-28 Thread Patrik Wallstrom
On Tue, 28 Aug 2001, Brian Grayless wrote: Gotta problem For some reason, many of my persistent connections aren't terminating. I end up with up to 30 connections to MySQL that aren't being used. My guess is that the user connection is slow and the script never finishes running or

[PHP-DB] use php Convert between(foxpro) `.dbf' files and MySQL

2001-08-28 Thread yang
use php Convert between(foxpro) `.dbf' files and MySQL thk's -- 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] Last Modified question..

2001-08-28 Thread Jay Paulson
I have a problem... I want to check the last modified time that a file was changed/updated. Actually, it's an employee database that I'm working on and I thought about just checking the last modified date on the file that the information was stored on. However, I get a permission denied error

Re: [PHP-DB] Last Modified question..

2001-08-28 Thread Justin Buist
a) What kind of database is this? b) use fstat() to check the modification time on a specific file. c) You will have to modify permissions so that the user your web server runs as has 'read' permission on the file if you want to use fstat(). Justin Buist Trident Technology, Inc. 4700 60th St.

Re: [PHP-DB] Last Modified question..

2001-08-28 Thread Jay Paulson
A) It's a MySQL database that I'm using B) I'm using file_exsist() and to check the modified date I'm using filemtime() C) If I modify the permissions on the file wouldn't that possibly cause some security issues? Thanks, jay - Original Message - From: Justin Buist [EMAIL PROTECTED] To:

Odp: [PHP-DB] Linux/PHP/Interbase

2001-08-28 Thread Jarek Zgoda
Od: "Todd Cary" [EMAIL PROTECTED] Temat: Re: [PHP-DB] Linux/PHP/Interbase I am still trying to find out which RPM I need to install... I think it's apache-devel, i also have RH 6.2 now! But, to be honest, you should go for apache 1.3.20, if it's possible, all up to 1.3.19 had some

[PHP-DB] Database Transactions and HTTP statelessness

2001-08-28 Thread Bopolissimus Platypus
hello all, I've got a question about what's got to be a common problem. I'm sort of doing a survey to see how others have solved this problem before so that I can choose one that's best for me. Basics: The software is a web based data entry system. Sessions are maintained (so that users

[PHP-DB] Re: Database Transactions and HTTP statelessness

2001-08-28 Thread Manuel Lemos
Hello, Bopolissimus Platypus wrote: hello all, I've got a question about what's got to be a common problem. I'm sort of doing a survey to see how others have solved this problem before so that I can choose one that's best for me. Basics: The software is a web based data entry

[PHP-DB] putting files with post [sec]

2001-08-28 Thread Szalay Attila
Hi Folks! My favourite programmer friend asked me a strange question: How does PHP (or the web server) defend itself from sending big files by post in an argument? He means, that he sends by post from html to php, and he does'nt want to have a 1,5M(or more) big column in his database :) Best

[PHP-DB] Re: phpMyAdmin problem

2001-08-28 Thread Shin
Hi. You can use the IP address too, but the localhost will works fine in almost all server. Maybe is better you talk with the server's sysop/administrator and ask for how to confg. your php script. Like I sad before, ALMOST all server acepts the host server as localhost, than check your ID and

[PHP-DB] RE: [PHP] iODBC Troubles / Troubles in ODBC Land

2001-08-28 Thread Andrew Hill
Jonathan, It looks like you are mixing threaded and non-threaded libraries. I assume PHP is non-threaded here, ensure you are using the non-threaded version of iODBC and check with your MyODBC driver maintainer for a libmyodbc.so that is non-threaded. Also, you may wish to just post these