[PHP-DB] Postgresql Connection

2002-06-02 Thread smith
I was using PostgreSQL 7.1.3 before, and I have upgraded PostgreSQL to 7.2.1 in these days. But after I upgraded the PostgreSQL server, I cannot connect it by the PHP scripts. It shows nothing , not even error message telling me what' going wrong? Could anyone tell me how to solve this problem

[PHP-DB] MySQL/PHP Form & Addslashes() command

2001-01-25 Thread James Smith
d the NULL spots to make it a new paragraph when you open this row in a page. How do I get that to work... Thank You, James Smith __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- PHP Dat

[PHP-DB] .htpasswd?

2001-01-31 Thread James Smith
Is there a way that when a user signs up for a user/pass on a site, to automatically update the .htpasswd on the site? Right now I'm running a Win2k Pro, with Apache installed and MySQL/PHP. Thanks, James __ Get personalized email addresses fro

Re: [PHP-DB] question ! show binary

2001-01-31 Thread James Smith
The way you have it now, ur just storing the path to the gif. from the form field, use then in the insert area use: $result = mysql_query("insert into (filename) VALUES ('$file')") James --- Yui Hiroaki <[EMAIL PROTECTED]> wrote: > HI! > > I am using PHP in mySQL. I create table in datab

[PHP-DB] newlines in boxes..

2001-02-01 Thread James Smith
Alright, on my site, I have a news section, whenever i goto insert new news in the Admin area, I have to insert or /n in it, while typing in the news. How do I make this a automated process I know it can be done, but addslashes doesn't work and htmlspecailchars() doesn't work what will? Thank

[PHP-DB] Best Way

2001-02-17 Thread Don Smith
age. Thanks for any help, Don Smith NewsVideo.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] Re: [PEAR] Re: PEAR DB 1.6.0 has been released

2004-02-21 Thread Lukas Smith
scenario. The reason that ADODB scores so high can be read here: http://marc.theaimsgroup.com/?l=pear-dev&m=100793507904834&w=2 regards, Lukas Smith [EMAIL PROTECTED] ___ BackendMedia www.backendmedia.com [EMAIL PROTECTED] Linn Zwoch Smith GbR Pariser S

[PHP-DB] PHP 5 mysql_fetch_array problems

2004-08-25 Thread Joe Smith
I'm hoping someone can help me with this. I am having problems with the mysql_fetch_array function in PHP 5.0.1 - the code listed below works fine with PHP 4.3.2. Here is my setup: A DB class file that has the following for the mysql_fetch_array (I know this function is OK because its working wh

Re: [PHP-DB] Which Database Abstraction Layer ?

2004-09-30 Thread Lukas Smith
Lester Caine wrote: Ed Lazor wrote: Has any performance testing been done between ADOdb and PEARdb? Not recently. Personally I am still trying to benchmark engines within ADOdb against the latest Firebird. This is an area where any results would be useful. There are speed comparisons on the ADO

Re: [PHP-DB] Which Database Abstraction Layer ?

2004-10-01 Thread Lukas Smith
Lester Caine wrote: Lukas Smith wrote: mysql: http://marc.theaimsgroup.com/?l=pear-dev&m=108239153527834&w=2 ibase: http://marc.theaimsgroup.com/?l=pear-dev&m=108240351804395&w=2 there are other interesting points being discussed through out this thread but with a noteably f

Re: [PHP-DB] php code on sqlite

2004-10-20 Thread Mike Smith
Add after your closing On Wed, 20 Oct 2004 11:50:29 -0700 (PDT), Aravalli Sai <[EMAIL PROTECTED]> wrote: > hi > this is php code for inventory management system > which is done using SQLite.this is an user > interface where an user wil giv values to the text > boxes and it should be sav

Re: [PHP-DB] IIS and php sessions

2004-11-15 Thread Mike Smith
I'm pretty sure this is enabled by default in PHP for Windows, I think you'll need to check the IUSR_[machine_name] persmissions on the sessions folder. I'm headed in the other direction. I'm re-writing an app with a database abstraction layer with hopes of moving to postgres. -- PHP Database Mai

[PHP-DB] Subject: Re: FIle Uploading to database

2002-02-04 Thread neil smith
RE Could not execute f query : Is it possibly a typo, such that INSERT INTO Canidate should read Candidate (ie with the correct number of d's for the english speling ;-) Just a thought. Neil. At 02:13 04/02/2002 +, "Todd Williamsen" <[EMAIL PROTECTED]> wrote: $query = "INSERT INTO

[PHP-DB] RE Viewing Session Varibles

2002-02-08 Thread neil smith
your if statement executes and unsets the value for $cart[$id], which *is* a valid variable name. Could you replace $$id==0 with isset($$id) and see if you get the same results? Cheers, Neil Smith. At 20:57 07/02/2002 +, you wrote: >From: Robert Weeks [mailto:[EMAIL PROTECTED]] &

[PHP-DB] Re ModSSL Problem

2002-02-08 Thread neil smith
icro$ fault for producing flaky browser versions, apparently. PS - Isn;t this a PHP / My SQL list ? Just a thought, but Jefferey perhaps this sort of stuff is better on the Apache/ModSSL lists? Cheers, Neil Smith. At 20:57 07/02/2002 +, you wrote: >From: "Jeffrey Cleary" <

[PHP-DB] Fwd: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046

2002-02-12 Thread Neil Smith
(! $remote) { $remote=$REMOTE_ADDR; } And thats it. If your user has a *real* IP address you get $remote set to value of $REMOTE_ADDR, else it fishes out any forwarded address from the proxy and returns that ;-) Use gethostbyname to lookup the hostname from IP address. Cheers, Neil Smith. >-

[PHP-DB] Fwd: php-db Digest 12 Feb 2002 09:59:09 -0000 Issue 1047

2002-02-12 Thread neil smith
er_id in the global scope (assuming you have register_globals switched on in php.ini, as most ISPs do) : i.e. you know you set it rather than somebody else, and can rely on the value. Cheers, Neil Smith. >Hi there. You could avoid all of that trouble by using session variables. >Upon suc

[PHP-DB] Fwd: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046

2002-02-12 Thread Neil Smith
ons to other peoples problems, and provide help where possible. Very grateful for the input others have generously provided. I think though that the nature of this list is probably more for newbies than experienced MCP or open-source guru discussions, preferably for discussion of PHP and

[PHP-DB] Re: need an idea...

2002-09-06 Thread Doug Smith
well... honestly i don't know how to write PHP scripts that will do this, but... maybe i can point you in the right direction... sounds like what you're talking about is Data Mining, especially data mining that incorperates the use of some type of web spidering ability. One product that we use a

[PHP-DB] Getting LDAP schema

2002-09-12 Thread Dave Smith
Howdy. I'm working on a PHP-based alternative to GQ, and it is coming along very nicely thanks to PHP's genius. I have run into an obstacle, though, and that is getting LDAP schema. I'd like to use the ldap_search() function or some alternative to capture the schema for an LDAP server so I ca

Re: [PHP-DB] SQL update help

2002-09-20 Thread Dave Smith
Jeffrey is right, but here's an easier way: $sql = "UPDATE $table SET pages = '$PHP_SELF' WHERE session = '$holy_cow'"; Be sure you use double-quotes to build the string (so that all variables get interpolated) and single-quotes within. Any non-numeric value has to be quoted for an SQL stateme

Re: [PHP-DB] BLOB retrieval

2002-09-24 Thread Dave Smith
Go to www.php.net and type in the name of your database (mysql, postgres, oracle, mssql) in the search box. That will give you a list of all the functions available. Getting a blob is generally the same as getting any other data type. Here's the paradigm: 1. connect to the database 2. execute

Re: [PHP-DB] Return Array from Function

2002-09-26 Thread Dave Smith
Try single-quotes instead of double (' instead of "). Could be an interpolation issue. --Dave On Thu, 26 Sep 2002, Hutchins, Richard wrote: > Can somebody tell me what I might be doing wrong in the code below? I'm > trying to use a function to perform an often-used db query and return the > re

[PHP-DB] Noob error question

2002-10-06 Thread Noah Smith
This may be a rather noob question, but: I make several requests against a mysql db roughly of the form: mysql_connect mysql_select_db mysql_query mysql_close This will work for several connections (and sometimes all connections over the course of the script) On occassion, the script will be u

[PHP-DB] Separating content from style

2002-10-09 Thread Dave Smith
Folks, I've just learned a bit about Java Beans and how they are useful in separating content from style. They let you do XSLT'ish stuff in your HTML to grab data while not bogging down your HTML with database-related function calls. I've heard this setup referred to as "templates" and "3-tie

Re: [PHP-DB] Separating content from style

2002-10-09 Thread Dave Smith
I agree that it is always good practice to use good design even for small projects, because they almost invariably turn into large projects if you don't. ;) This has been some great info. I appreciate it. Can someone explain what the purpose of a template engine is and possibly draw up a simpl

Re: [PHP-DB] Separating content from style

2002-10-09 Thread Dave Smith
hoenster wrote: >On 9 Oct 2002 at 17:48, Dave Smith wrote: > > > >>I agree that it is always good practice to use good design even for >>small projects, because they almost invariably turn into large projects >>if you don't. ;) >> >>This has be

Re: [PHP-DB] Server Upgrade and DB Move(s)

2002-10-15 Thread David Smith
On Tue, 2002-10-15 at 15:31, [EMAIL PROTECTED] wrote: > and the file copy method > just seems to easy, it almost seems wrong ;-), This is a feature that is pretty nice about MySQL. You cannot do this with Postgres, which caused my quite a few nice headaches over the summer. You must dump the tab

Re: [PHP-DB] global vars

2002-10-30 Thread David Smith
When you redirect, you lose your variables. This means that you must send them in some form to the other script. If you change your redirect command to the following, you will see that $a gets transferred and echoed in the second script as well as the first: Header("Location: second.php?a=$a"); N

Re: [PHP-DB] Idea as to why this query won't work as expected?

2002-11-05 Thread Dave Smith
Try grouping your WHERE clauses with parentheses like so: select * FROM OrderTable WHERE ( submitted=1 AND dateinserted>='1036386000' AND dateinserted<='1036502796' AND order_status='Shipped' ) OR order_status='Not Shipped' I can never remember whether SQL is left-to-right, right-to-left, or som

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Dave Smith
One thing I do with Postgres that I'm not sure MySQL supports is Kerberos5 authentication. This way, a user logs in (and they have a user account on the DB) and I use their remote user name and their Kerberos ticket to authenticate them to the DB. That works without having to store a password a

Re: [PHP-DB] Select Fields

2002-11-06 Thread David Smith
Tyler, You probably need one or two of the following: 1. Put single-quotes around case in your SQL (where type like 'case') 2. Use wild-cards in your where statement (where type like '%case%') Good luck! --Dave On Wed, 2002-11-06 at 23:31, Tyler Whitesides wrote: > Hi, > Sorry if this is ametu

[PHP-DB] HTTP Authentication with MySQL/PHP

2002-11-17 Thread David Smith
I have a directory 'admin' that has been .htaccess'ed off. Ie, If you point your browser at that directory, you will be prompted with an HTTP authentication dialog. Nothing special about PHP or MySQL there. I like the security that .htaccess and Apache give me. Now, I have users in a MySQL table w

Re: [PHP-DB] how to clear the array

2002-11-20 Thread Dave Smith
How about: $my_array = array(); // clears the whole array (and makes a new one) Or: $my_array[$i] = null; // clears a single entry in the array at index $i --Dave karthikeyan wrote: How to clear an array? i used unset. But it destroys the array property of the variablke itself. I just need t

[PHP-DB] Unserializing objects containing PHP code

2002-11-23 Thread Dave Smith
I am currently serializing some PHP objects and storing them in MySQL. When I pull them out of MySQL, I unserialize them and use them. Some of these objects contain PHP code inside of arrays. I'd like to execute that PHP code rather than display it. Any ideas how to accomplish this? (btw: I'd l

Re: [PHP-DB] safe way to retrieve the record i just inserted

2002-11-24 Thread Dave Smith
Perhaps pg_last_oid() will help: http://www.php.net/manual/en/function.pg-last-oid.php --Dave Dave wrote: Hi everyone, I am new to the forum. I am using PHP and PostgreSQL. After I insert into a table "Task" who's primary key is a serial type (auto sequence number) I would like to immediately

Re: [PHP-DB] Sessions Vs DB Access

2002-11-24 Thread Dave Smith
Chris, I'm assuming you're running this thing on *nix. Session variables are stored on the file system. PHP writes them out to /tmp, where it subsequently reads them upon request. The question is: How good at caching is your DB? If it can cache common select queries, then you are probably bett

Re: [PHP-DB] some data output formatting and grouping question...

2002-12-02 Thread David Smith
I don't see an easy way to do this in one SQL statement. But, the following PHP does the trick for me (assuming MySQL): // get the list of Y values $r = mysql_query( "SELECT * FROM table GROUP BY Y" ); while( $y_val = mysql_fetch_array( $r ) ) $y_vals[] = $y_val['Y']; // For each Y, fetch

Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread David Smith
Are you able to connect to the MySQL server from the command line using a non-php client? --Dave On Wed, 2002-12-04 at 09:04, [EMAIL PROTECTED] wrote: > > do you have the persmissions set either for [EMAIL PROTECTED](which > would only work from remotehost.com) or username@'%' (which would work

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

2001-08-28 Thread Darren Smith
users - it is a very popular guestbook. Is this normal? Is their a limit on the amount of users? Please let me know if I have got this all wrong :) Thanks in advance for your time Darren Smith [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP-DB] Probably an easy question - blank search fields (PHP & MySQL)

2002-01-06 Thread Gary Smith
s there an easy way to code "if the field is blank, send %, else send the users entry" or just putting % before whatever is sent? (this shouldn't mess up what's being entered, surely?) Thanks for any help. -- Gary Smith E: [EMAIL PROTECTED] W: http://www.l33t-d00d.co.uk Pics:

[PHP-DB] RE: [PEAR-DEV] New Metabase Aniversary release

2002-01-22 Thread Lukas Smith
standard. FYI: there has been a lot of discussion about this project in the last couple months (especially december irrc) on the pear-dev mailinglist. So some questions might allready be answered there. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet

Re: [PHP-DB] php and mysql

2002-12-07 Thread David Smith
Three words: php dot net --Dave On Fri, 2002-12-06 at 23:19, Jason Wong wrote: > On Saturday 07 December 2002 11:54, Dallas wrote: > > hey, i'm just new to using php and mysql > > > > i would like to know how to do the following for a assignment of mine > > (shopping site):- > > > > and if I cou

Re: [PHP-DB] multiple table inserts at the same time

2002-12-07 Thread David Smith
These two methods are nearly identical. Practically, you will probably never see a performance difference. The time it takes to perform a query is an order of magnitude greater than the time it takes to allocate space for and iterate through an array. I would imagine that you will never notice a di

Re: [PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread David Smith
This can be done using the 'timestamp' type for your column. Note that this field will be updated to the current time any time the row is modified (including when it is created). An alternative is to do it on the scripting side with the MySQL NOW() command like so: INSERT INTO your_table (field1,

Re: [PHP-DB] Query with optional params

2003-01-05 Thread David Smith
Rich, When I do searches with multiple fields, I construct the SQL string on the PHP side. You can do something like this: $sql = "SELECT * FROM docmeta WHERE "; if( $PartNumber ) $sql .= "PartNumber='$PartNumber'"; if( $Title ) $sql .= " AND Title='$Title'"; and so on... That

RE: [PHP-DB] Help about printing an integer variable

2003-01-06 Thread Lukas Smith
Alternatively you could use str_pad() Regards, Lukas Smith [EMAIL PROTECTED] ___ BackendMedia www.backendmedia.com [EMAIL PROTECTED] Linn Zwoch Smith GbR Reuchlinstr. 10-11 Raum 4.1.6 D-10553 Berlin (Tiergarten) Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

Re: [PHP-DB] Re: blob

2003-01-07 Thread David Smith
On Tue, 2003-01-07 at 15:52, [EMAIL PROTECTED] wrote: > > I agree with this method. i have not yet seen an advantage of storing > blobs in a database. Is there one? i'm sure those on this list would have > an opinion if there was one. personally, i like storing all this stuff on > the file sys

Re: [PHP-DB] Re: blob

2003-01-08 Thread David Smith
On Wed, 2003-01-08 at 06:50, [EMAIL PROTECTED] wrote: > > i know this is a bit down the chain, but i'm trying to keep the message > strings in tact > > but can't you set up your directory just like you set up your mysql Grants. > I have a directory that the web user owns, who is in its own gr

Re: [PHP-DB] Authenticating through a php script

2003-01-09 Thread David Smith
Jeremy, LDAP authentication happens in two stages: connect and bind. The connect stage is just establishing a connection with the LDAP server (ldap_connect()). No username or password is necesary in this stage. Once your connection is established, you attempt a bind (ldap_bind())to verify a userna

Re: [PHP-DB] Authenticating through a php script

2003-01-09 Thread David Smith
(eregi(" $data = eregi_replace("} else { > $data = $base . $data; >} >$this->RESPONSE = $data; >fclose($fp); >return true; > } > ## END FUN

[PHP-DB] MSSQL + PHP incredibly slow

2003-01-17 Thread Joey Smith
We've been using PHP hosted on a win32 machine to connect to SQL Server 2000. When the PHP host and the MSSQL host are the same machine, everything is fine. But when we try to use seperate hosts for PHP and MSSQL, query times become unbearably slow. The odd thing is that I can run the same scrip

[PHP-DB] displaying multiple search results

2003-03-09 Thread Gerry Smith
Help please I enclose my code examples of two pages. One to gert search data from a user which uis POSTed to the second page where it's validated and displayed. The prev/next only works for the first 20 records. When i click next, my page reloads and re applies my validation rules and outputs t

Re: [PHP-DB] mysql_connect() problem

2003-03-17 Thread David Smith
You need to install the php-mysql rpm. You can get this on your RedHat CD, or through apt-get: apt-get install php-mysql Get apt here: http://apt.freshrpms.net/ Does the PHP project ever plan to do something as impressive as CPAN so users won't have to reinstall or recompile just to extend its f

Re: [PHP-DB] Not seeing whats wrong with code

2003-03-19 Thread David Smith
Mike Delorme wrote: Hello, I am trying to write a script that conects to mysql, then SHA database. Then I need to list ALL the rows of table members. It sais there is a error on line 18. The while statement is on line 18, and I cant firgure out whats wrong with it: $host = "localhost"; $uname =

Re: [PHP-DB] Display results on html page

2003-03-20 Thread David Smith
You appear to have a ton of extra braces. I've modified your code below. That should do it, though keep in mind that your HTML is faulty too, though most browsers will probably tolerate it. :) --Dave Michelle Whelan wrote: I am looking to display results of a query inside of an html table. Wh

Re: [PHP-DB] temporary files

2003-03-23 Thread David Smith
You might consider using tmpnam() instead. tmpnam() doesn't give you a file handle (like tmpfile() does), but rather a file name. Just pass it a directory (like "/tmp") and a prefix to help identify it (can be "" ). It returns the unique file's name, and you could open a file handle to it with

[PHP-DB] Re: ODBC driver for ORACLE

2003-05-29 Thread Dave Smith
Alain Barbu wrote: > Hi, > > Is there any free ODBC Driver for ORACLE 9i to use with PHP, APACHE, LINUX > ? > > Regards > Alain The Oracle Client software includes a perfectly good ODBC driver. If you install the client it will be included. -- Dave Smith [EMAIL PROTECT

Re: [PHP-DB] Using fopen() for internet URL

2003-06-08 Thread David Smith
Tony S. Wu wrote: I have an auto-update script to gather some information from other web pages to update information in my database. And i use fopen() to open the URL. as far as i know, the return result contains image, which i don't need. If you call fopen()/fread() on a web page that contains

Re: [PHP-DB] Removing cart items with hyperlink question

2003-06-08 Thread David Smith
Boa Constructor wrote: The first line below works but the second one doesn't. If $quantity were to equal 0 then I want both of these to do exactly the same thing. echo ""; echo "Remove Item"; Are you using POST or GET on the receiving end of the script? Also, try urlencoding the href like th

Re: [PHP-DB] Anyone know what Error 502 Bad Gateway means?

2003-04-12 Thread David Smith
Try this out: http://www.checkupdown.com/status/E502.html Robert Johnson wrote: Hi all. I'm getting this error using Dreamweaver MX, php and mysql on a IIS server over my intranet. I can't figure out what it means... it happens when I try to connect to a table using php. TIA, Robert -- PHP

Re: [PHP-DB] Error notice

2003-07-12 Thread David Smith
You are referencing variables that you have not created (or perhaps array indexes that don't exist). To suppress these messages, fix your code to not do such things, or just put this at the top of your scripts: error_reporting( E_ALL ^ E_NOTICE ); Or edit php.ini to make it happen globally:

Re: [PHP-DB] Pros/Cons Database vs Excel

2003-07-23 Thread David Smith
want, and tell your boss it's as easy for you to add fields to the database as it is for him to add them to excel :D. These of course are just my opinions so you can always take it or leave it as if I said nothing at all. David Smith On Tue, 2003-07-22 at 22:35, Ow Mun Heng wrote: > Hi

Re: [PHP-DB] Downloading Database?!?!

2003-07-23 Thread David Smith
does make it a little simpler so that you can plan for 14 weeks of whatever you're doing. David Smith On Wed, 2003-07-23 at 01:32, Stephen March wrote: > Have you considered using the console-tool, "mysqldump " ? > You could write a quick script ... say > > mysqldump

[PHP-DB] Formatting numbers

2003-07-24 Thread David Smith
if so how do I make it change from a comma and every three spaces to fit the formats above? I know that this is probably pretty simple, but I can't seem to find the answer anywhere (possibly right under my freakin' nose :D). Thanks. David Smith

RE: [PHP-DB] Formatting numbers

2003-07-24 Thread David Smith
Thanks. That works perfectly. David Smith -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 3:36 PM To: David Smith; php-db Subject: Re: [PHP-DB] Formatting numbers > I am a little new to PHP, but I am trying to pull numbers fro

Re: [PHP-DB] hi (php-SSH)

2003-07-28 Thread David Smith
Suman Aluru wrote: hi , is there any way to write a PHP program for SSH. I want to establish a SSH connection and work some commands in the remote system and close the connection. Yes, just do this (uses an SSH key file): "; echo `ssh -i /path/to/key/file [EMAIL PROTECTED] ls /tmp`; echo

Re: [PHP-DB] subtracting dates...

2003-08-02 Thread David Smith
Try this (taken from http://us2.php.net/manual/en/ref.datetime.php): *menaurus at gmx dot de* 16-Jul-2003 02:37 |The argument has to be in the standard mysql format (y-m-d)... function age($date) { if (!$date) return false; $year=0+substr($date,0,4); $month=0+substr($date,5,2); $day=0+subs

Re: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Smith
This doesn't have much to do with PHP and databases, but here's a thought: You can leave them all .htm and have apache treat .htm files as .php files. Just check out httpd.conf for configuration. If your box is sufficiently zippy, you will see now slow down by running pure html files through PH

Re: [PHP-DB] Comparing tables

2003-08-26 Thread David Smith
> I would like to compare 2 tables in a database to determine which records > are different!!! Any clues out there. Thanks in advance! You didn't say which DBMS you are using. If you're using a DBMS which supports INTERSECT (not MySQL), and assuming the two tables have the same column names and

Re: [PHP-DB] Database backup

2003-08-27 Thread David Smith
Just do a mysqldump on the command line. It will dump a whole bunch of SQL code that can be used to recreate the database in the event of disaster. You could even pipe the output to gzip to compress it. mysqldump --all-databases -u root | gzip -c > mysql_backup.gz That works fine for me. The

Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-02 Thread David Smith
Gnanavel wrote: I have problem in executing linux command $output=exec("ls -a"); echo "$output"; the above coding works, but $output=exec("cp file1 file2"); echo "$output"; does not works. can any one help me out of this problem When I was executing the "cp" command it doesn't return anything.

Re: [PHP-DB] how to recognize user login name?

2003-09-04 Thread David Smith
Spychała Wojciech wrote: I have to do user recognizing in m php project. Simplest method i know is to recognize for example login name (when user is logging into his local PC) I've tried to use $USERNAME variable but it isnt what i want because it recognize login name on server not remote user If

Re: [PHP-DB] copy files (ftp?)

2003-09-04 Thread David Smith
Lars Jedinski wrote: I have to copy files created with php on www.aaa.com to another domain, e.g. www.bbb.com Is and if how is this possible with PHP? If you have an FTP server running on www.bbb.com, then it is possible. Here are the relevant functions: http://php.net/ftp And here's some re

Re: [PHP-DB] how to recognize user login name?

2003-09-04 Thread David Smith
>> >I've tried to use $USERNAME variable but it isnt what i want because it >> >recognize login name on server not remote user >> >> If you are referring to the Windows login name, this is not possible >> with PHP via the web browser. > > Sure it is. It's usually in $_SERVER['LOGON_USER'] or somet

Re: [PHP-DB] copy tables between db's

2003-09-07 Thread David Smith
Have you tried something like this: insert into database1.tablename select * from database2.tablename; database1 and database2 are the names of the two databases. tablename is the name of the table you want to copy from database1 to database2. In your case I guess this would be: insert i

Re: [PHP-DB] copy tables between db's

2003-09-07 Thread David Smith
David Smith wrote: insert into database1.tablename select * from database2.tablename; database1 and database2 are the names of the two databases. tablename is the name of the table you want to copy from database1 to database2. Correction: from database2 to database1, not vice versa

Re: [PHP-DB] RH 8.0 Mysql help

2003-09-09 Thread David Smith
One comand and you are done: apt-get install mysql-server httpd php php-mysql Don't have apt for RedHat? Download this: http://ftp.freshrpms.net/pub/freshrpms/redhat/8.0/apt/apt-0.5.5cnc6-fr0.rh80.1.i386.rpm and run 'rpm -i' on it. There's no better way to install software than apt. Pre

Re: [PHP-DB] best" upload method

2003-09-12 Thread David Smith
> which is the "best" upload file method ? > file uploads or FTP commands from PHP Now that's the most open ended question I've read all day. Here, flip a coin. If it falls heads, FTP. If it falls tails, the other one. Even still, I'm not sure I understand the question: File uploads or FTP command

Re: [PHP-DB] best" upload method

2003-09-13 Thread David Smith
ct("$ftp_server"); $upload = ftp_put($conn_id, "$destination_file", "$source_file", FTP_BINARY); ftp_quit($conn_id); how depends on the application ? - Original Message - From: "David Smith" <[EMAIL PROTECTED]> To: "open-mind" <[EMAIL PRO

Re: [PHP-DB] stripping carrige returns with SQL

2003-09-26 Thread David Smith
If you are trying to replace the carriage return it needs to be \r instead of \ n in your query. Also it may not work because in my experience the replace function under mysql does not replace them in the db but in the query results. If you are looking to replace them permanently you will need a sc

[PHP-DB] PHP 5 and MySQL

2003-10-01 Thread John Smith
does not show this. Is there a way to activate it? Thanks, -- John Smith -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Is this redundant? {OT}

2003-10-06 Thread David Smith
Robin Kopetzky wrote: Good afternoon. I found this code in a program I'm renovating and think this is very redundant. Also, it does slow queries down while doing all of the conversions. prod_id in the mysql database is declared an integer. where prod_id = '" . (int)$prod_id . "' and Qu

[PHP-DB] php4 can't find tnsnames.ora oracle9 but can connect if description hardcoded

2005-04-19 Thread neil smith
Hello, I have test script that can connect to the oracle database. It doesn't require tnsnames.ora because I define the database alias in the script itself. It looks like this: echo "TWO_TASK=".getenv("TWO_TASK").""; echo "LD_LIBRARY_PATH=".getenv("LD_LIBRARY_PATH").""; echo "ORACLE_BASE=".getenv(

Re: [PHP-DB] php4 can't find tnsnames.ora oracle9 but can connectif description

2005-04-22 Thread neil smith
; ie the full description of the database alias within tnsnames.ora However this is not good, so if you have any other idea please let me know. I'm flumuxed. thanks, neil >From: Christopher Jones <[EMAIL PROTECTED]> >To: neil smith <[EMAIL PROTECTED]> >CC: php-db@lis

[PHP-DB] php3 and oracle9i client libraries doesn't compile

2005-04-28 Thread neil smith
hello people, I'm using this command to configure php3 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --enable-versioning --enable-track-vars --with-oci8=/u01/app/oracle/product/9.2.0.4 --with-oracle=/u01/app/oracle/product/9.2.0.4 --enable-sigchild t

Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile..

2005-04-28 Thread neil smith
a - thanks for that!! would that be part of an oracle library? thanks, neil >From: Martin Norland <[EMAIL PROTECTED]> >Reply-To: php-db@lists.php.net >To: php-db@lists.php.net >Subject: Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile.. >Date: Thu, 28 Apr 200

Re: [PHP-DB] php3 and oracle9i client libraries doesn't compile..

2005-04-29 Thread neil smith
libvppdc.so xsqlserializers.jar libgslsg9.a libocijdbcst9.alibvpxdba.so xsu111.jar libgslssb9.a libodm9.so libvpxeap.so xsu12.jar >From: Christopher Jones <[EMAIL PROTECTED]> >To: neil smith <[EMAIL PROTECTED]> >CC: php-db@l

[PHP-DB] general rule for when to perform an operation in either Mysql or php

2006-01-29 Thread daniel smith
I am playing around with Mysql and php and I am not sure about when it is best do something in mysql or php when BOTH can perform the operation. Example, date formating can be performed by Mysql during the query DATE_FORMAT(blah, blah...) or by php with date(blah, blah..). What are the upsides/do

Re: [PHP-DB] FW: Excel to CSV

2006-03-10 Thread chris smith
> Have you any script/example how to Save As Excel file to CSV using PHP? You don't need to repost your question if you don't get an immediate response. Going "file", "save as" is client side. PHP can't interact with excel like that. Create a VB macro or something to do it. -- Postgresql & php t

Re: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread chris smith
On 3/14/06, Eustace <[EMAIL PROTECTED]> wrote: > Hello, > > I hope somebody can assist. I am using dreamweaver 8, Mysql, PHP5 for a > simple we application. After using the dreamweaver wizard to make a > connection, then created a recordset. Trouble starts when I use > require_once(connections/Conn

Re: [PHP-DB] Mysql/PHP5 connection error

2006-03-14 Thread chris smith
c:\Inetpub\wwwroot\safdem_web\Admin\Connections\connSAFDEM.php because that's what the server is looking for. > -Original Message- > From: chris smith [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 14, 2006 12:04 PM > To: [EMAIL PROTECTED] > Cc: php-db@lists.ph

Re: [PHP-DB] PHP + OCI en Debian

2006-03-23 Thread chris smith
On 3/24/06, SJL <[EMAIL PROTECTED]> wrote: > It´s true. I find the sources of oci8.so. > > But in my first try to compile it, It failed because the it have calls > to php.h and info.h, so I try to move the sources files to the path > where I have this files (taking care with the relative path in th

Re: [PHP-DB] PDO Exception Handling Question

2006-04-02 Thread chris smith
On 4/2/06, Rodney Topor <[EMAIL PROTECTED]> wrote: > I've just started using PDO with PHP 5.1 and MySQL 5.0. Everything > seems to work fine, except for one issue with the following example > from the PHP manual. > > try { > $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass); >

Re: [PHP-DB] Messenger Question!

2006-04-05 Thread chris smith
On 4/5/06, Julien Bonastre <[EMAIL PROTECTED]> wrote: > http://www.tech-recipes.com/internet_tips1157.html > > > Should help you out I hope > > > Wasn't awfully difficult to source either > > Method: > > Step one: Enter google.com.au in internet browsing client of choice > Step two: use "msn messen

Re: [PHP-DB] mssql_select_db(): Unable to select database:

2006-04-08 Thread chris smith
On 4/9/06, blackwater dev <[EMAIL PROTECTED]> wrote: > Hello all, > > I set up freetds on one of my servers and everything worked fine. I just > set it up on another server (this one with the latest php) and now the same > code seems to connect but can't select the db mssql_select_db(): Unable to

Re: [PHP-DB] Question regarding the scope of pg_prepare

2006-04-14 Thread chris smith
On 4/14/06, Will Chapman <[EMAIL PROTECTED]> wrote: > I have a few different pg_prepare statements in my PHP script. I was > wondering what scope they lie in. Im assuming they are not saved in the > PSQL database, so it is just for the script? They are inside of > functions... does it only last

Re: [PHP-DB] Insert select Blob field from MySQL

2006-04-15 Thread chris smith
On 4/15/06, Robert <[EMAIL PROTECTED]> wrote: > Does anyone have an example of how to insert and select a blob field in a > MySQL 4.1 database ? Search google for "php mysql blob" it will give you tons of results (link is too long to post). First 3 results are articles on exactly what you want.

Re: [PHP-DB] MD5, MySQL, and salts

2006-04-17 Thread chris smith
On 4/18/06, Sean Mumford <[EMAIL PROTECTED]> wrote: > Hi Guys, > I'm working on securing user passwords in a MySQL 4 database with a PHP5 > frontend. I remember being told in one of my classes (I'm currently a > college junior) that the best way would be to hash a salt and the password > together a

Re: [PHP-DB] MD5, MySQL, and salts

2006-04-18 Thread chris smith
On 4/18/06, Giff Hammar <[EMAIL PROTECTED]> wrote: > For an example, look at how UNIX/Linux stores regular login passwords. In > short, the salt is the first two characters in the password. When comparing > passwords, you take the salt and the user supplied password, encrypt, then > compare the two

  1   2   3   >