Re: [PHP-DB] Upgrading PHP

2002-08-14 Thread Adam Williams
I'd uninstall php first...I believe its rpm -e mod_php (or you can do rpm -e `rpm -qa|grep php` and then I'd upgrade apache and PHP on your box for security reasons. Read the installation section in the php manual at www.php.net for details. Adam On Wed, 14 Aug 2002,

Re: [PHP-DB] Upgrading PHP

2002-08-14 Thread Adam Williams
I should add if you are going to upgrade apache also, to rpm -e apache first so that You will have a clean install. backup httpd.conf first though! But you might want to save /etc/logrotate.d/httpd because the rpm -e removed this, and it is what rotates the log files for

Re: [PHP-DB] PHP File for adding to database

2002-08-15 Thread Adam Williams
what is the structure of the table that this info will be going into? Paste me the CREATE TABLE command you used to create it. Adam On Thu, 15 Aug 2002, Shoulder to Shoulder Farm wrote: Hi all, How can I make a PHP4 page that will add information to a MySQL database

Re: [PHP-DB] Connecting Linux (PHP) to MS Access database

2002-08-15 Thread Adam Williams
See if this message posted earlier helps you out: http://marc.theaimsgroup.com/?l=php-dbm=102938139730405w=2 Adam On 16 Aug 2002, Osman Omar wrote: Hi, Can I connect/access MS access database from linux ? if can, what software/driver that I need? Now I'm using

Re: [PHP-DB] Return Results in Categories - like CNET

2002-08-16 Thread Adam Williams
If your articles are in an SQL database uses the LIMIT clause on your SQL statement. Adam On Fri, 16 Aug 2002, olinux wrote: I would like to allow articles to be searched and returned in grouped categories - similar to cnet.com See example here:

Re: [PHP-DB] default value for date.

2002-08-19 Thread Adam Williams
set a default value that isn't possible (like -99-99 99:99:99) and then have an if statement saying if ( $row[date] == '-99-99 99:99:99' ) { $row[date] = '';} Adam On Mon, 19 Aug 2002, Smita Manohar wrote: i'm using php with mysql. some tables in database have

[PHP-DB] is the following query legal?

2002-08-26 Thread Adam Williams
I have an informix database with a table called phptesttable. It has a SERIAL field (for mysql users that can help, its the same as INT NOT NULL PRIMARY KEY AUTO_INCREMENT) and a CHAR field (CHAR in Informix is the same as VARCHAR in mysql). In my PHP script if I submit an array and then insert

Re: [PHP-DB] is the following query legal?

2002-08-26 Thread Adam Williams
I got it to work. I have to put the statement in ifx_prepare right before I call it in the loop. I think its because when I define the statement at the start of the code, $statement[$counter] has not been asigned yet so it sets its value to nothing. Adam -- PHP

Re: [PHP-DB] How do I submit data AND send user to other page?

2002-08-26 Thread Adam Williams
use an HTML form. Adam On Mon, 26 Aug 2002, Gerd Ulrich wrote: Hello, I want to build a questionaire where the user is guided through five pages of questions. How can I program PHP that the user gets to the second page after pushing the Submit-Button? My solution

Re: [PHP-DB] AUTO_INCREMENT problemos

2002-08-27 Thread Adam Williams
Thats how its supposed to work. It won't reuse old numbers even after you delete the entire row. Adam On Tue, 27 Aug 2002, simon wrote: Hi Wondering if anybody can help with this: My table has an INT column named 'member_id' which is set to AUTO_INCREMENT. It

Re: [PHP-DB] Create database

2002-08-27 Thread Adam Williams
?php $conn = mysql_connect(localhost,username,password) or die(Couldn't connect to mysql); $query = (CREATE DATABASE db_name); if (mysql_query($query)) { echo pThe database was created successfully/p; } else { echo pThe database was not created .mysql_error()./p; } ? If it still gives you the

Re: [PHP-DB] login won't work for Internet Explorer

2002-08-27 Thread Adam Williams
View the source in mozilla, it might just be suppressing the output for whatever reason. Adam On Wed, 28 Aug 2002 [EMAIL PROTECTED] wrote: Hi there, I am experiencing a peculiar problem. I have recently moved a PHP / MySQL driven website I have been developing

Re: [PHP-DB] connectivity problem

2002-08-27 Thread Adam Williams
look at http://www.php.net/manual/en/function.pg-connect.php do you have postgresql starting with the -i paramater so that it is listening on a TCP port? PHP needs this to be able to connect to postgresql. Adam On Tue, 27 Aug 2002, Brian Noecker wrote: Hey everyone,

Re: [PHP-DB] connectivity problem

2002-08-27 Thread Adam Williams
In your connect statement, you aren't selecting a password and TCP port to connect to. You made need to specify those. Adam On Tue, 27 Aug 2002, Brian Noecker wrote: Hey everyone, got a problem here. I'm using php4.2.1, postgres 7.2. I'm trying to do a simple

Re: [PHP-DB] Script to control mysql users?

2002-08-29 Thread Adam Williams
read mysql.com's documentation on the GRANT command. Or install phpmyadmin and use that. Adam On Thu, 29 Aug 2002, Leif K-Brooks wrote: I need to add mysql users to some databases, but my dumb control panel (ensim) doesn't seem to have a feature to do that, and I'm

Re: [PHP-DB] This is driving me insane!

2002-08-29 Thread Adam Williams
restart apache Adam On Thu, 29 Aug 2002, James Hatridge wrote: HI all... I'm at my end, would some kind soul please help? I'm working on a database using SuSE 8.0, mysql, and PHP. All the standard installs. I need to use exec, unlink, etc. BUT the durn PHP is

Re: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams
set you to owner of the script and then chmod 700 it Adam On Thu, 29 Aug 2002, Smita Manohar wrote: hii im using php script with mysql. i want to hide the script from the admin or from the person who has privileges to access all the data. bcos i use ftp to upload

RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams
oh yeah duh me, set it 701 Adam On Thu, 29 Aug 2002, Ryan Jameson (USA) wrote: Wouldn't that make php unable to read it as well? Then it is useless as well. Ryan -Original Message- From: Adam Williams [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29

RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams
Apache can execute a file without reading it. Don't believe me? Make a file 701 and then open it in apache. Adam On 29 Aug 2002, Mateus Cordeiro Inssa wrote: Em Qui, 2002-08-29 às 16:05, Adam Williams escreveu: oh yeah duh me, set it 701

RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams
Cordeiro Inssa wrote: Em Qui, 2002-08-29 às 17:48, Adam Williams escreveu: Apache can execute a file without reading it. Don't believe me? Make a file 701 and then open it in apache. Oh, yes, so can apache bypass the kernel ? I don't think so, unless it is running as root or the file

Re: [PHP-DB] PHP Editor?

2002-09-06 Thread Adam Williams
1: http://quanta.sourceforge.net/ 2: yes Adam On Fri, 6 Sep 2002, Bryan McLemore wrote: First off, What html/php editor do you guys think is better? Secondly, perhaps a little more relevant to the database part of this. I just want to clarify that with

Re: [PHP-DB] SQL Query

2002-09-06 Thread Adam Williams
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY Adam On Sat, 7 Sep 2002, Bryan McLemore wrote: Hi Guys I have written this SQL Query : CREATE TABLE tasks (id INT AUTO_INCREMENT, name VARCHAR(50), desc TEXT, address VARCHAR(50), startDate DATE, lastWork DATE, progress

Re: [PHP-DB] Apache 2.X and PHP

2002-09-07 Thread Adam Williams
Yes but support is experimental so you may notice strange behavior. Adam On Sat, 7 Sep 2002 [EMAIL PROTECTED] wrote: Is it possible to run Apache 2.X with PHP? Julio Cuz, Jr. [EMAIL PROTECTED] Information Services Riverside Community College mailto:[EMAIL

Re: [PHP-DB] php start-stop howto?

2002-09-12 Thread Adam Williams
look in /etc/httpd/conf/httpd.conf when you restart apache (/etc/rc.d/init.d/httpd restart) it restarts php because php is called by apache. Adam On Thu, 12 Sep 2002, Warren Massengill wrote: RedHat Linux 7.2 RPM installation included: PostgreSQL 7.1.3 PHP 4.0.6

Re: [PHP-DB] to determine how much server space left on the webserver?

2002-09-17 Thread Adam Williams
?php exec(df -h); ? On Tue, 17 Sep 2002, Bo wrote: Any ideas of how to write a php script to determine the disk space left in my account at my web server? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] to determine how much server space left on the webserver?

2002-09-17 Thread Adam Williams
actually make that system(df -h); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: onnecting to MSSQL database from Linux?

2002-09-17 Thread Adam Williams
He's using microsoft sql server, not mysql. try --with-mssql maybe? Adam On Wed, 18 Sep 2002, Jason Morehouse wrote: It means you haven't compiled mysql support into php. Recompile it using --with-mysql -- Jason Morehouse (jm[@]netconcepts[.]com) Auckland, New

Re: [PHP-DB] Current row of query

2002-09-26 Thread Adam Williams
why not if (!($1%2)) { echo even!; } else { echo odd!; } Adam On Thu, 26 Sep 2002, Brad Bonkoski wrote: oops... I meant: (if $i is odd) ... because $i would be the current index in the array. Brad Bonkoski wrote: why not this? $result = mysql_query(Select *

Re: [PHP-DB] Noob questions...

2002-10-02 Thread Adam Williams
search around for phpmyadmin on google Adam On Wed, 2 Oct 2002, Brett Lathrope wrote: Ok, here's my scenario... My Web Host has all Root Admin control over MySQL and PHP configs (but they are setup well no complaints there)...I simply have access to 1 DB (already

[PHP-DB] Re: [PHP] problem with informix

2002-10-21 Thread Adam Williams
I'd go back to apache 1.3.27 and php-4.2.3 if I were you and see if that fixes your problem. I run Informix, PHP, and Apache on a server and have had no problems. Adam On Mon, 21 Oct 2002, Erwin Speybroeck wrote: Hi, I'm struggling with a problem for quite some time.

Re: [PHP-DB] sql select

2002-11-12 Thread Adam Williams
Have you ran it by hand in MySQL from the command prompt with some test data and gotten an error? Adam On Tue, 12 Nov 2002, Steve Dodkins wrote: if i have a statement $result = mysql_query(SELECT

Re: [PHP-DB] Return 1 instance of each unique record?

2002-12-06 Thread Adam Williams
use GROUP BY field Adam On Fri, 6 Dec 2002, Doug Coning wrote: Hi everyone: How do I get MySQL to summarize a query so that I receive only 1 instance per similar record. I.E. if you have 10 records with name Smith and 5 records with Barney, etc, that it would

Re: [PHP-DB] passing variables

2002-12-09 Thread Adam Williams
www.php.net/isset if !isset($var) { echo var is not set to anything; } else { echo var is set to $var; } On Mon, 9 Dec 2002, Edward Peloke wrote: Hello all, I have a login/register screen for my php/mysql db. When the page opens, the user sees the log in screen but I have a button and

Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
can your main workstation ping 192.168.1.1 On Mon, 9 Dec 2002, Alex Francis wrote: At last I have Apache and PHP running on my server. My server IP is 192.168.1.1 and I have set ServerName 192.168.1.1 in my httpd.conf file. I can access my test files from the server using either

Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
can you ping your router? is it filtering ICMP? can you ping anything? is your cat 5 cable crimped properly and you have link lights on your switch/hub/router and network card? Adam On Mon, 9 Dec 2002, Alex Francis wrote: It seems like a network problem. I can access

RE: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
No I think he has his WS with a real IP from his ISP and then his web server plugged into the same hub as his WS but with 192.168.1.1. He'll either need to get a 2nd NIC and give it an ip like 192.168.1.2 or get a cable modem router. Or change his WS to linux and add eth0:0 with 192.168.1.2 :)

Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
On Mon, 9 Dec 2002, Alex Francis wrote: Adam, You are correct. I had two NICs, set up exactly as you describe, but kept getting problems (I would lose my internet connection and have to reboot to get it back. I think I will try againand if that fails, buy a cable modem router. Adam Williams

Re: [PHP-DB] bulk miorting rows into mysql db

2002-12-13 Thread Adam Williams
use mysqlimport, its a program that comes with MySQL. go to www.mysql.com and click on documentation to learn more about it. Adam On Fri, 13 Dec 2002, mikek wrote: I have a few hundred rows of data to import into a mysql db. Its currently tab separated. What's the

Re: [PHP-DB] Help with FTP

2002-12-27 Thread Adam Williams
use system() to run /bin/df depending on the OS you might need to add a flag to it like -h (linux) or -k (solaris). www.php.net/system Adam On Fri, 27 Dec 2002, Dankshit wrote: Is there a way to see how much space is left in a ftp server? thanks in advance! --

Re: [PHP-DB] keyword searching

2003-11-12 Thread Adam Williams
the db is looking for all the fields that contain holmes, north, and carolina. CPT John W. Holmes wrote: From: Adam Williams [EMAIL PROTECTED] CPT John W. Holmes wrote: From: Adam Williams [EMAIL PROTECTED] I am selecting a field in a database called description for keyword searching

[PHP-DB] keyword searching

2003-11-12 Thread Adam Williams
Hello, I am selecting a field in a database called description for keyword searching. The field contains names of people, states, years, etc. When someone searches for say holmes north carolina the query searches for exactly that, fields which have holmes north carolina, and not fields that

[PHP-DB] informix error

2003-11-19 Thread Adam Williams
Hi, I was wondering if anyone has seen this informix error before. It has me stumped. Searching on google didn't reveal anything. Running my query in informix returns the proper results, so I'm not sure what the problem is. Warning: ifx_fetch_row(): 4 is not a valid Informix Result resource

[PHP-DB] compiling oracle support

2004-02-12 Thread Adam Williams
How do I compile PHP on Unix to have oracle 9 support. Looking at ./configure --help and PHP's website, I see no option for oracle 9 support. I see --with-oci8 but that appears to only work for Oracle 8. Any help? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] working with ' in SQL

2004-03-04 Thread Adam Williams
Hi, I have an SQL statement that is ran when data is submitted through a form. When someone types in a word with an ' such as farmer's the SQL statement fails. I tried $_POST[data] = addslashes($_POST[data]); before executing the SQL statement, but the statement still fails. any

[PHP-DB] mssql query

2004-03-16 Thread Adam Williams
I've used mysql a little, but now I'm working with a MS SQL SERVER 2000 database. We have a proprietary application/hardware setup where when a person enters the building, the time they enter the building is automatically put into the database in a field called eventtime, and their access

[PHP-DB] ocilogon error

2004-03-31 Thread Adam Williams
Hi, I have oracle and PHP working together on a remote server called zed that runs redhat linux. I have another computer called accessserver that runs win2k pro with PHP that I am trying to connect to oracle on zed. Both computers have the oracle client libraries installed. On accessserver I

[PHP-DB] postgresql

2004-04-14 Thread Adam Williams
Hi, I know this isn't PHP related but I have a quick question about postgresql. I come from a mysql enviroment so I'm a little clueless, even after reading the postgresql docs. I am moving a postgresql database from one server to another. As the user that owns the database, lculber, I ran

[PHP-DB] logic problem

2004-04-21 Thread Adam Williams
I'm using some proprietary software/hardware where when a visitor swipes their entry card, it is recorded in a mssql 2000 server. My boss wants a count of unique vistors for a range of dates. So, I need to have it give a count of unique vistors, meaning that I need to count all vists for a

Re: [PHP-DB] logic problem

2004-04-21 Thread Adam Williams
the eventime to a date or some unique string to represent the date. On Apr 21, 2004, at 1:13 PM, Adam Williams wrote: I'm using some proprietary software/hardware where when a visitor swipes their entry card, it is recorded in a mssql 2000 server. My boss wants a count

Re: [PHP-DB] logic problem

2004-04-21 Thread Adam Williams
Yeah I basically had that with my previous SQL statement, I was grouping by event.cardnum instead of counting the cardnums by date. I think what I'm trying to do is beyond the scope of SQL and I'll have to write some PHP to take the SQL statement results and feed them into an array and count

Re: [PHP-DB] logic problem

2004-04-21 Thread Adam Williams
by date In MySQL you don't need to specify a field for count(). And you should have to convert the eventime field twice, you should be able to reference the calc field in the group by. On Apr 21, 2004, at 2:19 PM, Adam Williams wrote: Yeah I basically had that with my previous SQL

Re: [PHP-DB] logic problem

2004-04-21 Thread Adam Williams
for count(). And you should have to convert the eventime field twice, you should be able to reference the calc field in the group by. On Apr 21, 2004, at 2:19 PM, Adam Williams wrote: Yeah I basically had that with my previous SQL statement, I was grouping by event.cardnum instead

[PHP-DB] oracle error ORA-12154

2004-07-16 Thread Adam Williams
Hi, I'm trying to connect to an oracle 9.20 database using: $conn = OCILOGON(dah50,dah50,zed2.aleph0); but I get the error ORA-12154 Searching on google says my listener.ora or tnsnames.ora may have problems, but I think mine are correct. Can someone take a look and see if they are ok?

Re: [PHP-DB] oracle error ORA-12154

2004-07-16 Thread Adam Williams
$TNS_ADMIN=/home/beckman/oracle/network/admin If those aren't set, then things won't work. Please confirm that those environment variables are set in Apache or whatever web server you are using. If they aren't, oci8 won't work. Beckman On Fri, 16 Jul 2004, Adam Williams wrote: Hi, I'm trying to connect