[PHP-DB] Reading and Writing ?

2002-01-17 Thread Dave Carrera
Hi All How can I read the contents of 1 file then Write those contents to a newfile? This is baffling me. I Know about fopen,fread,fwrite but cant seem to get the logical steps clear in my head. As always any help or pointers given are most appreciated. Yours Dave C -- PHP Database

[PHP-DB] Connecting from PHP to MySQL on another Server

2002-01-17 Thread Boaz Yahav
Hi 1. What is the difference between working with PHP and MySQL on a local server and working with PHP and MySQL when MySQL is on a remote server? 2. What is the protocol used to connect to MySQL on a local server and what is the protocol used to connect to a remote MySQL server? 3. Is there a

RE: [PHP-DB] Reading and Writing ?

2002-01-17 Thread Beau Lebens
easy peasy dave :) (pseudo-code - cause i'm lazy and hopefully you aren't :P) ?php[esque] create file pointer to file 1 (read-only r?) read file 1 into string close file pointer to file 1 create file pointer to file 2 (creating if necessary (w)) write string from file 1 to this pointer

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

2002-01-17 Thread Boaz Yahav
Very good answer Frank, Thanks! My department is 95% MS oriented and this is why we prefer an MSSQL Server 2000 Cluster instead of a sun based cluster. We already have an MSSQL 7.0 Cluster which we will be upgrading soon to MSSQL Server 2000 which has been up for over 2 years. It's running on

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

2002-01-17 Thread Boaz Yahav
I don't think you realize the nature of the site. Its an auction site and not a retail site. Prices need to be updated on thousands of clients simultaneously. Our goal is to refresh the data on the client every 3-10 seconds while having 1500 online open auctions. This is quite a mess :)

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

2002-01-17 Thread Boaz Yahav
Fail Over is not for when the cluster is too busy, it's for when the server dies, or when someone killed it's power, or when you loose your network, or when you get a blue screen (assuming you are on windows :). Then, in about 30 seconds the cluster will do a fail over to the 2nd node and the

[PHP-DB] Updating multiple rows from a single form submission

2002-01-17 Thread John Hawkins
Hi again! I have a MySQL table named ratings. It has 5 fields in it like this: ID, name, deposit, days, hands The table has 10 rows in it with assorted data in each field. Here is what I would like to to: 1. Display all 10 rows of data on the page in a table with the fields deposit, days and

RE: [PHP-DB] Connecting from PHP to MySQL on another Server

2002-01-17 Thread Beau Lebens
// 1. What is the difference between working with PHP and MySQL // on a local // server and working with PHP and MySQL when MySQL is on a // remote server? none - just specify different hostname in connection call (perhaps IP more reliable) // 2. What is the protocol used to connect to MySQL

RE: [PHP-DB] Updating multiple rows from a single form submission

2002-01-17 Thread Beau Lebens
Hi John - I have come up against this one a number of times, and have found that the following works pretty nicely - although there may be better ways out there - get your records from the db - loop thru them, using some sort of ID field to print each row in your table with names something

RE: [PHP-DB] any good web hosting with php and mysql support?

2002-01-17 Thread Boaz Yahav
Check out : http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm This is your one stop shop for hosting. WeberDev.com is hosted there and I can tell you that their service is amazing. They are fast, reliable and more than anything, very professional (specially in PHP / MySQL).

RE: [PHP-DB] What is REG_BADRPT, and why do I get it?

2002-01-17 Thread matt stewart
It's not anything to do with the special regular expression characters again is it? -Original Message- From: Beau Lebens [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 01:38 To: 'Markus Lervik'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] What is REG_BADRPT, and why do I get it? on a

[PHP-DB] Problem with BIG MySQL query

2002-01-17 Thread George Pitcher
If I perform the following query in MySQL_Front, It works but I get no records returned (there should be 10 records). If I use it with php on my web page, I get an error: Supplied argument is not a valid MySQL result resource in [script name] which is probably because of the zero return. The

[PHP-DB] Problem with BIG MySQL query

2002-01-17 Thread George Pitcher
If I perform the following query in MySQL_Front, It works but I get no records returned (there should be 10 records). If I use it with php on my web page, I get an error: Supplied argument is not a valid MySQL result resource in [script name] which is probably because of the zero return. The

[PHP-DB] Re: [PHP] Connecting from PHP to MySQL on another Server

2002-01-17 Thread Jon Farmer
1. What is the difference between working with PHP and MySQL on a local server and working with PHP and MySQL when MySQL is on a remote server None in terms of functionality. 2. What is the protocol used to connect to MySQL on a local server and what is the protocol used to connect to a

[PHP-DB] mysql_select_db() or die() fails when db exists

2002-01-17 Thread Malcolm White
Hi, I am experiencing a problem with this function; funcion do_connect($server, $db, $user, $pass){ $link = @mysql_pconnect($server, $user, $pass) or die(error: mysql_pconnect()); mysql_select_db($db) or die(error: mysql_select_db()); } when supplied with variables that are

[PHP-DB] password problem

2002-01-17 Thread James Kupernik
I'm creating this form where the person needs to enter a password to move on. When they enter the password it just loops back to enter the password and doesn't move on. But then I remove the requirement for a password the page moves on and loads the information from the DB. Why is this? --

[PHP-DB] quiestion

2002-01-17 Thread Thomas \omega\ Henning
can someone tell me a decrypt and crypt fuction besides in the mcrypt pack? -- 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] string compare function

2002-01-17 Thread tomhilton
Hi, I'm having a problem with the stcmp() function. I have it comparing two string variables, $pword and $conf_pword, in a script. I know they both have values, but the result always compares to 1 when $pword is the first variable in the function, and -1 when $pword is the 2nd variable in the

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
post the entire line of code, (and the surrounding couple of lines?? and we'll get more of an idea. -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 14:56 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function Hi, I'm having a problem with

[PHP-DB] string compare function

2002-01-17 Thread tomhilton
Hi, this is more of an earlier post regarding the strcmp function and my problems with it on my Win98 machine. This is the actual code I used for the strcmp function, $errors=0; if (empty($username)||empty($pword)||empty ($conf_pword)||empty($redirect)) { echo h3Please hit your browser's

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
take it you've tried having exactly the same value for each to test if the return is 0? it shouldn't be comparing literals, but it looks like it could well be! try putting round the variables, and various things like that? -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
by the way, what are you actually trying to do with the code? there may be a different way of doing it which isn't so confusing? -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 15:20 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function

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

2002-01-17 Thread Steve Cayford
Hello again. On Thursday, January 17, 2002, at 01:06 AM, chip wrote: On Wednesday 16 January 2002 08:57 pm, Steven Cayford banged out on the keys: On 2002.01.16 19:59:37 -0600 chip wrote: Let's tackle the first one first - OK. On Tuesday 15 January 2002 10:20 pm, Steven Cayford banged

Re: [PHP-DB] Problem with BIG MySQL query

2002-01-17 Thread Miles Thompson
George Have you tried changing and transactions.ExtractID=bib_extract.E_ID to and bib_extract.E_ID = transactions.ExtractID ? You have the join, but it's reversed. The transactions table is the primary determinant of the query, Transactions.Course_ID = '210' , thus fields returned from

[PHP-DB] enter key?

2002-01-17 Thread James Kupernik
I found the problem in the form and fixed that, but now anytime I want to submit the form by hitting enter, it acts like it's reloading the page. What would be the cause of that? When I click on the submit button the verification and program function correctly, but when I hit enter, they do not.

Re: [PHP-DB] enter key?

2002-01-17 Thread Jason Wong
On Friday 18 January 2002 00:25, James Kupernik wrote: I found the problem in the form and fixed that, but now anytime I want to submit the form by hitting enter, it acts like it's reloading the page. What would be the cause of that? When I click on the submit button the verification and

Re: [PHP-DB] enter key?

2002-01-17 Thread James Kupernik
Sorry about that ?php if ($submit) { if ($person == -) { $error = Please select your name!; } elseif ($magicword != password) { $error = Please enter correct password!; } else { echo bHi $person, here are the catalog requests/b\n;

Re: [PHP-DB] enter key?

2002-01-17 Thread Jason Wong
On Friday 18 January 2002 01:30, James Kupernik wrote: Sorry about that ?php if ($submit) { This is probably where your problem is. Which browser are you using? To fix this you could include a hidden element in your form and check for this rather than checking for submit. You

Re: [PHP-DB] Alter Table / ADD col_name

2002-01-17 Thread Miles Thompson
Keith, You're building it upside down! If your design relies on adding columns to store data you will quickly run out of columns. More typically when you submit data you add a row of information to a database, not another column. Database design and normalization are topics which are too

RE: [PHP-DB] Alter Table / ADD col_name

2002-01-17 Thread Rick Emery
Other than what sounds like a bad design decision, you can: $query = ALTER TABLE mytable ADD COLUMN newcol INT UNSIGNED AFTER anothercol; mysql_query($query) or die(Error: .mysql_error() ); -Original Message- From: Keith Webb [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002

[PHP-DB] very simple answer

2002-01-17 Thread Barry Rumsey
I can't figure out where I have gone wrong. Maybe not enough sleep, anyway this is the simple query: $query = SELECT * FROM xp_topics WHERE artist='artist'ORDER BY topicid DESC LIMIT 0,1; $result = mysql_db_query($query) or die(Select Failed!); echo(Latest Artists : $topictext br); It says

[PHP-DB] OCI8

2002-01-17 Thread Randall Barber
I've been using the OCI8 extension and have a question about the Persistent Connections. While debugging the site, I will run into the following error (paraphrased): BeginSession: too many processes running etc... I have my scripts setup in the following way: ?php OCIPLogon(...); stuff ?

Re: [PHP-DB] very simple answer

2002-01-17 Thread Miles Thompson
Barry, Add or die( mysql_errno() . : . mysql_error() ) It could be you don't have any data, also there's no space between /artist' and ORDER BY. Also trim off everything after 'artist' and see what you get. If it still doesn't work there's something wrong with the field

Re: [PHP-DB] very simple answer

2002-01-17 Thread Barry Rumsey
I ended up rewriting it again and somewhere I must have done something wrong as it now works. Thanks guys. Maybe I should think about more sleep. - Original Message - From: Miles Thompson [EMAIL PROTECTED] To: Barry Rumsey [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 18,

[PHP-DB] Storing Credit Card info

2002-01-17 Thread olinux
I have a client that would like to store credit card information online. I have worked with shopping cart type systems in the past, but never stored CC info. What is the best way to do this? I was thinking that I can write and read using include() to a directory that is not available to the web.

Re: [PHP-DB] Storing Credit Card info

2002-01-17 Thread Paul G
Hi olinux, If I understand what you are saying...I would use mcrypt and encrypt the stored info, keeping the KEY and IV in a separate location for when you need it. Chances that anybody will break the triple des encryption without the KEY and IV are slim to none. That way, you don't have to

RE: [PHP-DB] password problem

2002-01-17 Thread Rick Emery
post your code -Original Message- From: James Kupernik [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 8:23 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] password problem I'm creating this form where the person needs to enter a password to move on. When they enter the password

[PHP-DB] Querying MySQL using PHP - modify existing query

2002-01-17 Thread Andrea Caldwell
I am a serious newbie (like less than two weeks never programmed before), so I hope my code doesn't suck too bad this isn't a really bad question... but here goes... I would like to modify this query so that it doesn't return the username, realname, and office results each time. The way the

Re: [PHP-DB] Querying MySQL using PHP - modify existing query

2002-01-17 Thread DL Neil
Andrea, I am a serious newbie (like less than two weeks never programmed before), so I hope my code doesn't suck too bad this isn't a really bad question... but here goes... I would like to modify this query so that it doesn't return the username, realname, and office results each time.

[PHP-DB] mysql query file

2002-01-17 Thread John Cuthbert
Hello. I am wishing to store all mysql querys in a single file and when they needed to be ran call them using include mysql.php; But I keep getting errors saying that its an invalid number of mysql resoruces or something like that when I bring the query into the atuual file and dont run it from

[PHP-DB] Lost In Space...Unknown persistent list entry type in module shutdown (14) in Unknown on line 0

2002-01-17 Thread Peter Bevilacqua
Hi Guys, application can edit records from db in IE fine but in NS 4.77 i get suppratic error messages: Unknown persistent list entry type in module shutdown (14) in Unknown on line 0 some records i can edit, most i can't without receiving the above error message PHP 4.06 ADODB 1.65 Netscape

Re: [PHP-DB] Storing Credit Card info - Encryption Functions

2002-01-17 Thread Paul G
Hi olinux, This is what I ended up doing. This will work if you have a PHP that was compiled with mcrypt as it is, just pass the info to your encrypt and decrypt functions. The key I used is 123 but you can use something different. The Initialization Vector is hard coded, but there is a function

[PHP-DB] Web Poll Using sql

2002-01-17 Thread Jacob Wyke
Hi, I know this must sound like a really easy question, but im trying to create a simple web poll, where you choose your answer from a radio button and then click submit. On submitting I would like to update a sql table depending on what box the user clicked. How can I make it so it increments

RE: [PHP-DB] Web Poll Using sql

2002-01-17 Thread Beau Lebens
Jacob, I think you can do something like UPDATE tablename SET fieldD=fieldD+1 WHERE pollTitle='title'; or similar? check the manual on updates and mathematical functions probably -b // -Original Message- // From: Jacob Wyke [mailto:[EMAIL PROTECTED]] // Sent: Friday, 18 January 2002

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

2002-01-17 Thread chip
On Thursday 17 January 2002 08:00 am, Steve Cayford banged out on the keys: Sorry, I think I got you off track. In this case you *do* want to set $pic from the GET vars. I guess how I would do this would be something like this: if(! isset($pic)) { $pic = 0; } Thanks, that fixed that part of

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

2002-01-17 Thread chip
The next part I tackled and won! Hard to believe actually, but I got the problem with last page fixed. On Tuesday 15 January 2002 10:20 pm, Steven Cayford banged out on the keys: To find out if $new_pic pointed to a valid image you would probably need to do a select count(*) from ab to get