RE: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Jason
first, make a function called query or something for pg_Exec ($conn, $sql); in this example though you would do $res = pg_Exec ($conn, $sql); for($i=0; @$row=pg_fetch_array($res, $i); $i++) { echo "$row[first] $row[last] " } that will loop through the results. make sure your actual qu

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy
> print_r? Am I about to learn something new? Be still, my beating heart! print_r will print the array $row which is one of the rows returned by running your query. You can then see all the values in the array. Just run it, you will see what it does. Or alternatively echo just one field from

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Ted Rolle
print_r? Am I about to learn something new? Be still, my beating heart! On Tue, 21 Aug 2001, speedboy wrote: > > $conn = pg_connect ("host=localhost user=username password=password > > bname=dbname"); > > > > $sql = "SELECT * FROM database where lower('$name%') order by last;"; > > > $result =

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy
> $conn = pg_connect ("host=localhost user=username password=password > bname=dbname"); > > $sql = "SELECT * FROM database where lower('$name%') order by last;"; > $result = pg_exec($conn, $sql); for ($i = 0; $i < pg_numrows($result); $i++) { $row = pg_fetch_array($result, $i);

[PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Smileyq
Hey I'm new to php and using databases. I've setup a postgres server and have already populated the database. I'm able to connect the the server just fine with php my problem is showing the results. Can somebody show me a easy to understand example. For example. I've got a address book databas

[PHP-DB] RE: [PHP] MYSQL_SOCKET

2001-08-20 Thread Jason Murray
> well i just compiled php again and that still didn't solve > the problem... i guess i just need to keep recompiling php until i > get that variable set to the right thing? How about, send us your ./configure line and we might be able to tell what's wrong with it instead of guessing? This inf

RE: [PHP-DB] E-Commerce - Integrating Sessions With Charging ProcessesThat rePOST

2001-08-20 Thread Justin Buist
I've heard of way too many people relying on HTTP_REFERER thinking it's a secure way to lock things down... so I'll take this chance here and illustrate what I'm talking about. You'll need: netcat (http://www.l0pht.com/~weld/netcat/) and a PHP webserver. Cut and paste the following HTTP request

[PHP-DB] Very specific PHP ODBC -> Access 97 on Novell connection question.

2001-08-20 Thread Gabe da Silveira
I work at a University where we just purchased some expensive reservation management software. It uses Access 97 as a backend, with ASP pages for its web module. Only problem is I want to basically write my own web stuff from scratch using (surprise) PHP. Well, best I can figure, I need to crea

RE: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST

2001-08-20 Thread Fotwun
How, code wise do I retreive the session data from the session id. Also, another response below said HTTP_REFERRER is not secure. So how do people who use this type of payment gateway secure the script it redirects to. All of the data it sends is form data, so once somebody new what script it redi

Re: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST

2001-08-20 Thread Jason Wong
- Original Message - From: Fotwun <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, August 20, 2001 1:40 PM Subject: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST > Hi, > > I have basically seen and used two methods for integr

[PHP-DB] Postgresql/PHP backend error

2001-08-20 Thread Nigel Gilbert
I have PHP 4.06, Postgres7.1 and Apache on a Solaris server. Most of the time all works as expected. Occasionally I get an database error: Database error There was a database error when accessing Database zwg: pqReadData() -- backend closed the channel unexpectedly. This probably means the bac

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Cody
At Monday, 20 August 2001, "Pitcher, George" <[EMAIL PROTECTED] uk> wrote: >Guys, > >If the purpose of the first message which prompted this thread was to reduce >bandwidth, then it gives the impression that its ok to waste bandwidth >having a meaningless debate like this but not if it's to deal

Re: [PHP-DB] simple odbc insert problem

2001-08-20 Thread Justin Buist
On Mon, 20 Aug 2001, LondonVibe wrote: > new to php so be nice :) > > win2k iis5.ms access.. > > what is the order for adding var's to a access DB ?? > code i tried... with data from form don't work... > > // connect to system dsn odbc name login and password or die > $connect = odbc_conn

Re: [PHP-DB] E-Commerce - Integrating Sessions With Charging ProcessesThat rePOST

2001-08-20 Thread Justin Buist
On Sun, 19 Aug 2001, Fotwun wrote: > My questions are how do you securly, reliably, and seemlessly integrate > sessions within that type of gateway. Because once the form data is posted > to the credit card gateway, it redirects (posts response data) back to the > script of your choice. However,

[PHP-DB] simple odbc insert problem

2001-08-20 Thread LondonVibe
new to php so be nice :) win2k iis5.ms access.. what is the order for adding var's to a access DB ?? i can read data form the DB ok.. even print it out in a nice table :)... but not sure how i write to the DB... it's driving me mad... any help or faq's would be cool... thx Jello code i

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Pitcher, George
Guys, If the purpose of the first message which prompted this thread was to reduce bandwidth, then it gives the impression that its ok to waste bandwidth having a meaningless debate like this but not if it's to deal with a newbie's request. just my 2c George, an English newbie in Scotland Stev

[PHP-DB] Re: Multi-Task on PHP by submitting a form!

2001-08-20 Thread «davidc»
: In the mail.php, i was thinking to add another process just after the mail : process had finish, which will insert the data from the from to : mysql_database. You could include(); the file that adds it to the database. I know what you're getting at, I do it myself. «dc» -- PHP Database Ma

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Steve Brett
sorry, my last post was aimed at B. van Ouwerkerk, not Marcel. Steve "Marcel Walter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]. com... > Hmmm > @B: In future... everything you send to me will go to /dev/spammer ... > > > -Original Message- > > From: B. van Ouwerker

RE: [PHP-DB] oracle (oci8) intro

2001-08-20 Thread Anthony Carlos
Here's what I'm using to do paged queries in Oracle: $min = minimum of range of records $max = maximum of range of records $field_list = the fields from the table separated by commas $table = the table from where you're selecting $where_clause and $order_by should be self-explanatory SELECT line

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Steve Brett
my point exactly > Yes. But being a newbie is a lame excuse for NOT searching the manual. who made you king of the castle ? Steve "Marcel Walter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]. com... > Hmmm > @B: In future... everything you send to me will go to /dev/spammer

[PHP-DB] Re: displaying related data from MySQL [SOLVED]

2001-08-20 Thread George Pitcher
Hi all, Well, I played about abit more and discivered that I as overcomplicating things by specifying the tablename in field to be displayed. Once I set it to just display the fieldname it worked swimmingly. Now I can really get going. George - Original Message - From: George Pitcher <[

Re: [PHP-DB] getting ID

2001-08-20 Thread Ian Grant
Just a little addition... I use this function to get the id value, given a field name, field data and table name: function getId($fname,$data,$tblName) { GLOBAL $conn; $query = "SELECT id FROM $tblName WHERE $fname = '$data'"; $result = mysql_query($query); $row = mysql_fetch_row($result); $id =

RE: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread B. van Ouwerkerk
hmmm, one slipped through. There is a difference between really trying and just send a message to a list with a question which is in the manual and very easy to find too. If you don't understand the manual it's alright to ask. Would be stupid if you didn't. Take a look at www.devshed.com .. s

RE: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Brunner, Daniel
HAHAHAHAHAHAHHAHAHAHAHAHAHAAHAH Dan > -- > From: Walter, Marcel > Sent: Monday, August 20, 2001 9:20 AM > To: 'B. van Ouwerkerk'; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] please, please can we stop this kind of > thing . ! > > Hmmm > @B: In future...

RE: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Walter, Marcel
Hmmm @B: In future... everything you send to me will go to /dev/spammer ... > -Original Message- > From: B. van Ouwerkerk [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 16:09 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] please, please can we stop this kind of thing

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread B. van Ouwerkerk
He got his answer.. didn't he? If ppl would bother enough to READ the FINE manual these PHP related lists would have less then 70% of current traffic. >i'm sure B (as we all were) was a newbie at some point. Yes. But being a newbie is a lame excuse for NOT searching the manual. Now.. the rest

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Andre P.
Just to put my own in. Allthough I have been programming php for a while I agree with Marky. Manuals are not allways clear and when starting it is often difficult to know what you need to look up. With regards to losing time reading posts surely it is faster to hit delete than go to the bother

RE: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Mark Milaszkiewicz
A newbies opinion.. I'm just getting into PHP and MySql stuff at the moment, i own 2 books on them, i have the manual on my Hard Drive, and its ok saying you should consult these, but sometimes they seem to be written in gibberish, and also the books only have in them what the author thought was

[PHP-DB] RE: [PHP-WIN] Multi-Task on PHP by submitting a form!

2001-08-20 Thread Asendorf, John
No problem... I do this with a file upload. Just include a mail function before or after the other work you do with the information: if ( isset ( $files ) ) { //send an email to the webmaster if someone hits this area MAIL( "[EMAIL PROTECTED]", "CC Resolution Uploads Attempted", "From: $email\

Re: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Steve Brett
i'm not a newbie. i program in php for a living. all i was saying was there are other people that will answer without sounding so arrogant. it just seems so unwelcoming. not in the spirit of things etc etc. i'm sure B (as we all were) was a newbie at some point. Steve "Michael Rudel" <[EMAIL

[PHP-DB] Re: [PHP-WIN] Multi-Task on PHP by submitting a form!

2001-08-20 Thread Angie Tollerson
Jack, Yes, you can do as many things as you want in a php document before you have die() at the end :) Angie >>> "Jack" <[EMAIL PROTECTED]> 08/20/01 08:12AM >>> Dear all I was trying to get a user input form to insert to a mysql_database and e-mail to me! Is it possible to make php perform two t

RE: [PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Michael Rudel
-Original Message- > From: Steve Brett [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 2:53 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] please, please can we stop this kind of > thing . ! > > > you know, i've been reading/contributing to this board for a > few months and

[PHP-DB] Re: Multi-Task on PHP by submitting a form!

2001-08-20 Thread Steve Brett
you're there already. have an if statement on mail.php: if (isset($posted_info)) { // send mail here // do db insert here } // end of if Steve "Jack" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Dear all > I was trying to get a user input form to inse

[PHP-DB] Multi-Task on PHP by submitting a form!

2001-08-20 Thread Jack
Dear all I was trying to get a user input form to insert to a mysql_database and e-mail to me! Is it possible to make php perform two task in one single submit button? The form will post the input --> mail.php. In the mail.php, i was thinking to add another process just after the mail process ha

[PHP-DB] displaying related data from MySQL

2001-08-20 Thread George Pitcher
Hi all, This sounds to me like a common question but I haven't found quite what I want anywaher (maybe I've been looking in the wrong place). So apologies from a complete newbie. I have built a database with 6 tables. The Master table contains keys to the other 5 tables. I want to be able to dis

[PHP-DB] Re: format dates from a database

2001-08-20 Thread Steve Brett
have a look at date_format() in mysql. there is quite a few date format functions that will allow you to format dates coming out of mysql. DATE_FORMAT(date,format) Formats the date value according to the format string. The following speci ers may be used in the format string: %M Month name (Ja

[PHP-DB] please, please can we stop this kind of thing ..... !

2001-08-20 Thread Steve Brett
you know, i've been reading/contributing to this board for a few months and every now and again i see posts from B and now it's really getting up my nose. people come here to find answers. i still come here asking questions. i am totally sick of your RTFM answers, i knew the answer to this also

Re: [PHP-DB] Re: interbase or postgres

2001-08-20 Thread Steve Brett
daddy or chips, daddy or chips go with postgresql. it's superb. we use at at work and have had nine months service with no unplanned downtime. fast and reliable and great php support - gets my vote every time. now if only i could persuade my company to stop paying micro$oft Steve "Jarek

Re: [PHP-DB] Newbie: Modify - Delete entries

2001-08-20 Thread Steve Brett
doh! sorry re-read your code. pls ignore last post. Steve "Steve Brett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if the fields are static i.e. > > name: > phone number: > etc etc > > have a look at > using while and foreach to dump your stuff out. > sho

Re: [PHP-DB] Newbie: Modify - Delete entries

2001-08-20 Thread Steve Brett
if the fields are static i.e. name: phone number: etc etc have a look at using while and foreach to dump your stuff out. should save you a fair chunk of code. Steve "Sg" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thank you Kate! > > I'll try that, but I

[PHP-DB] DBM-Fehler

2001-08-20 Thread Benedikt Nyqvist
Hi, ich bin gerade dabei, eine dbm zu erstellen. Folgenden Befehl wollte ich interpretieren lassen: Folgende Fehlermeldung tritt dann auf: Fatal error: Call to undefined function: dbmopen() in /raid/domains/de/n/nyger/htdocs/www/home.php on line 9 Zeile 9 ist die Zeile, die mit $dbh beginnt

[PHP-DB] PHP Error

2001-08-20 Thread Jose L. Benito
I'm using this script for connect to a mysql database but it only works in php3 not in php4, any ideas? $servidor = "localhost"; $usuario = "user"; $clave= "pass"; $base = "database"; $id = mysql_connect($servidor,$usuario,$clave); $conexion = mysql_select_db($base, $id); $consulta

RE: [PHP-DB] getting ID

2001-08-20 Thread Walter, Marcel
Yap ... this works quite fine with Sybase Thank you very much ... > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 12:27 > To: Walter, Marcel > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] getting ID > > > With MSSQL

RE: [PHP-DB] getting ID

2001-08-20 Thread tony . mccrory
With MSSQL I do: $result=mssql_query("select @@IDENTITY as 'jobNumber'"); $row=mssql_fetch_array($result); $insertid=$row[jobNumber]; May be similar for sybase.. I understand they have similar origins.. Tony

[PHP-DB] PHP ODBC Connection

2001-08-20 Thread jacques charlery
Hi everybody, I'm new to PHP4 and I'm trying my first connection to an odbc database. I'm using RedHat 7.0, PHP 4.0.1pl2, and unixODBC to connect via ODBC to MSSQL running on Windows NT. I've been able to correctly configure unixODBC with easysoft's odbc to odbc bridge. I've created an ms-sql file

RE: [PHP-DB] getting ID

2001-08-20 Thread Walter, Marcel
Is there a similar function for a Sybase - Database ? > -Original Message- > From: Ian Grant [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 12:20 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] getting ID > > mysql_insert_id([resource link_identifier]) returns the value

Re: [PHP-DB] getting ID

2001-08-20 Thread Ian Grant
mysql_insert_id([resource link_identifier]) returns the value of the auto_increment field for the previous INSERT query. It will return 0 if there is not an auto_increment field. If the link_identifier is not specified, the last opened connection is used. So, use $id = mysql_insert_id(); directly

[PHP-DB] successful connect to MS SQL

2001-08-20 Thread Sommai Fongnamthip
Dear, I am very appreciate to let someone known. I have been successful connect PHP (on Linux) to MS SQL 6.5 (on NT). This is my configuration: - Linux Red Hat 6.2 - Apache 1.3.20 /w MOD_SSL - PHP 4.0.6 - FreeTDS 0.52 (It make PHP directly connect to M$ S