Re: [PHP-DB] delete file contents (sorry if i posted this twice, problem with signing up)

2001-12-12 Thread Dobromir Velev
Hi, the easiest way is to open the file in a write only mode. $fp=fopen(/var/mail/myaccount,w); $fclose($fp); Here's an excerpt from http://www.php.net/manual/en/function.fopen.php 'w' - Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero

Re: [PHP-DB] Session Question

2001-12-12 Thread Russ Michell
I would add each item's unique item id to an array and pass the array as the session variable. Then use serialize($array) and unserialze($array) to pass the array from script to script. You could then loop thru the array at the checkout and insert the vars into your database. HTH Russ On

RE: [PHP-DB] Mail() Not working

2001-12-12 Thread Rick Emery
The mail() function works fine. $email must be set to you email program, NOT an email server. Should be something like /bin/sendmail. If you don't have access to this function, then you cannot send mail. -Original Message- From: Kevin J. Maynard [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP-DB] pear.php

2001-12-12 Thread Rick Emery
Did you do a GOOGLE search? I did: http://pear.php.net/ -Original Message- From: Osman Omar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 11, 2001 8:18 PM To: PHP List Subject: [PHP-DB] pear.php Hi where can I find pear.php I install 'moregroupware' and comment about missing

[PHP-DB] question

2001-12-12 Thread Robert Weeks
Hi, I'm a little stumped here, maybe I haven't had enough coffee yet... Anyway, I have a lot of SQL queries that return one row if there is a match and instead of having to write out something like this: $firstname = $row[firstname]; $lastname = $row[lastname]; $midinitial =

[PHP-DB] Assistance Urgent.

2001-12-12 Thread Bzdpltd
Hi I am new to this list and need some help with PHP and MYSQL. We have a database that has lots of fields in the table. What we are trying to do is get specific results, i will explain. Basicall we need to be able to retrieve the total number of records in the database but for individual

Re: [PHP-DB] Assistance Urgent.

2001-12-12 Thread DL Neil
Barry, We have a field named: related_discipline which contains 1 of 12 different disciplines. So for example we have Rail which could be in the field, or Utilities and so on.. what we need to do is know how many of each there are in the database, I am still developing my knowledge of PHP and

Re: [PHP-DB] question

2001-12-12 Thread Steve Cayford
On Wednesday, December 12, 2001, at 09:03 AM, Robert Weeks wrote: Hi, I'm a little stumped here, maybe I haven't had enough coffee yet... Anyway, I have a lot of SQL queries that return one row if there is a match and instead of having to write out something like this: $firstname

[PHP-DB] OCI Query Results

2001-12-12 Thread Rankin, Randy
We are using OCI to query an Oracle DB. Everything seems to work fine (i.e; data is returned to the browser), however, the first record of every recordset is NOT returned. I can run the same query in SQLPlus and all records are returned. It seems something in PHP is stripping of the first record

Re: [PHP-DB] Mail() Not working

2001-12-12 Thread Kevin J . Maynard
On Wednesday, December 12, 2001, at 01:14 AM, Cristian Pozzer wrote: my php.ini file has the following line in it: SMTP = mail.attbi.com my php script is as follows: ? $email = to_email; $from = from_email; $mesg = This is a test email. \r\n; if (mail($email, Test, $mesg, $from))

Re: [PHP-DB] Mail() Not working

2001-12-12 Thread Kevin J . Maynard
On Wednesday, December 12, 2001, at 06:12 AM, Rick Emery wrote: The mail() function works fine. $email must be set to you email program, NOT an email server. Should be something like /bin/sendmail. If you don't have access to this function, then you cannot send mail. So where would

RE: [PHP-DB] OCI Query Results

2001-12-12 Thread Rankin, Randy
Nevermind, I figured it out. There was a duplicate OCIfetchinto statement in the script. Randy -Original Message- From: Rankin, Randy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 10:12 AM To: PHP List Cc: Barker, John Subject: [PHP-DB] OCI Query Results We are using

RE: [PHP-DB] Mail() Not working

2001-12-12 Thread Rick Emery
It should look like: $email = /bin/sendmail; $to = [EMAIL PROTECTED]; $subj = A test message; $body = This is the body of the message; $hdr = Reply-to: [EMAIL PROTECTED]; mail ($email, $to, $subj, $body, $hdr); -Original Message- From: Kevin J. Maynard [mailto:[EMAIL PROTECTED]] Sent:

Re: [PHP-DB] question

2001-12-12 Thread Robert Weeks
Yup, I knew it was something really simple. I should never touch a computer before the coffee is brewed ;-) Thanks! Robert On Wednesday, December 12, 2001, at 11:09 AM, Steve Cayford wrote: Do you want $$fname = $val here? Taking the string in $fname as the name of a variable to which

RE: [PHP-DB] question

2001-12-12 Thread David Piasecki
If you know what your result set is going to be, it would be easier to do something like this: list($firstname,$lastname,$midinitial,$preferredname,$address1,$address2 ,$city,$state,$zip) = mysql_fetch_row($result); Or if you are returning more then one row, and want to loop through the

[PHP-DB] Data - countinents, countries, provinces, cities 10.000

2001-12-12 Thread Andy
Hi there, I am building a travel portal and I can't get data for the registration. Does anybody have, or know where I can get this data from? I am searching for the continents belonging to the countries, belonging to the provinces belonging to the cities over 1. Thanx for any help.

[PHP-DB] ODBC MS SQL 7.0 Not closing connection

2001-12-12 Thread Eric Liedtke
I am not sure where this is going wrong so I am hoping to find an answer on one of these 2 lists. I am using freetds/unixodbc in php to connect to an MS SQL7 server. I was having some problems with the connection hanging open, so I removed all me queries and trimmed my script down to a simple db

[PHP-DB] mssql_query, sybase_query

2001-12-12 Thread Bradley Bell
Is it just me, or is the documentation for these two functions totally wrong? They are sopposed to return int values, either a result identifier, or 0, if the query fails. However, it looks to me like it always returns a string. If the query returns data (i.e. a SELECT query), then it returns

[PHP-DB] Re: SQL problem is killing this newbie

2001-12-12 Thread Matthew Crouch
You need an associating table; members and movies are in a many-to-many relationship here. The associating table represents the act of viewing-a-movie, and describe who and what are involved comme ca: members memberid, name 1 Fred 2 Jack 3 Jill movies movieid, title 1 Fear and loathing 2

Re: [PHP-DB] you are here

2001-12-12 Thread RSalomo
russ, i found about the article here: http://www.zend.com/codex.php?id=414single=1 thank you fyi rudy - Original Message - Check out the php-navigation section at hotscripts.com. I found exactly that on there a couple of weeks back, it utilises cookies. Cheers Russ On Tue, 11 Dec