[PHP-DB] successful connect to MS SQL
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$ SQL.) - M$ SQL 6.2 on NT 4.0 Best Regards, Sommai Fongnamthip -- 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]
Re: [PHP-DB] getting ID
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 after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- 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] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- 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]
RE: [PHP-DB] getting ID
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 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 after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- 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] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- 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] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- 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] PHP ODBC Connection
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 and run this php file ?php putenv(LD_LIBRARY_PATH=/usr/local/lib); putenv(ODBCINSTINI=/usr/local/etc/odbcinst.ini); putenv(ODBCINI=/usr/local/etc/odbc.ini); $dsn=oobclient; // this is a valid DSN, can be tested in odbctest $user=; $password=; $conn_id = odbc_connect($dsn,$user,$password); if ($conn_id) echo connected to DSN: $dsn; else echo Connection impossible; ? Warning: SQL error: , SQL state in SQLConnect in /var/www/html/testodbc.php on line 14 Connection impossible Do I have to enable something ? -- 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]
RE: [PHP-DB] getting ID
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 Walter, Marcel To: 'Ian Grant' [EMAIL PROTECTED], [EMAIL PROTECTED] Marcel.Waltercc: @drkw.comSubject: RE: [PHP-DB] getting ID 08/20/2001 11:22 AM 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 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 after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- 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] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- 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] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- 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] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining
RE: [PHP-DB] getting ID
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 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 Walter, Marcel To: 'Ian Grant' [EMAIL PROTECTED], [EMAIL PROTECTED] Marcel.Waltercc: @drkw.comSubject: RE: [PHP-DB] getting ID 08/20/2001 11:22 AM 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 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 after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- 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] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- 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] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- 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] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including
[PHP-DB] PHP Error
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 = SELECT * FROM Recursos; $res = mysql_query($consulta,$conexion); $numero = mysql_num_rows($res); return $numero; In php3 returns the number of fields, but in php4 get the followings errors Warning: Supplied argument is not a valid MySQL-Link resource Warning: Supplied argument is not a valid MySQL result resource -- 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]
Re: [PHP-DB] Newbie: Modify - Delete entries
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 may need some more help on the way. Cheers! Sébastien. -- 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]
Re: [PHP-DB] Newbie: Modify - Delete entries
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. 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 may need some more help on the way. Cheers! Sébastien. -- 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]
Re: [PHP-DB] Re: interbase or postgres
daddy or chips, daddy or chips apologies to non-uk readers 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 Zgoda [EMAIL PROTECTED] wrote in message 00a301c12773$1d3ace40$836c4cd5@zgoda">news:00a301c12773$1d3ace40$836c4cd5@zgoda... Od: Michael [EMAIL PROTECTED] Temat: [PHP-DB] Re: interbase or postgres J-E-N wrote: just want to here comments from you guys. i will be doing a shopping cart and i'm still looking for the best database which i could use aside from Oracle.i'm still thingking which is better. interbase or postgres? Just a few comments - Postgresql has a larger range of data types and built in string functions, Interbase has no text datatype and (I think) like doesnt use an index. The text datatype is present, but is a BLOB subtype (as usually in C world - it's not a text, it's null-terminated string). I don't think you'd do badly using either but I'd lean towards postgresql. It seems to be deveoping at a faster rate than Interbase and probably has the edge performance wise. While Postgres has better future, IB is better now. IB has long way away as a commercial product, being utilized by most critical user (US Army used IB in it's M60TTS and M1 to M1IPM tanks). Anyway, i like IB. It's always the same - under Linux, Solaris, NT, NetWare... Cheers Jarek Zgoda -- 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] please, please can we stop this kind of thing ..... !
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 but wouldn't consider demeaning the poster in this way. please stop doing it; if you feel you need to the refrain from answering and let someone else do it. Steve B. Van Ouwerkerk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Buy a good book (PHP 4 Bible)!! read some tutorials!! And CHECK the manual.. found at www.php.net what else did you think people created if for.. http://www.php.net/manual/en/ref.strings.php gives you all string manipulation fun stuff you want. ucfirst() is the solution. And last but not least STOP crossposting. sql, mysql Bye, B. -- 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] displaying related data from MySQL
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 display related data when I display search results. This is the code I've been using (trial and error) but although I get a row for each fount record, I get an error in every table cell. $result=mysql_query (select * from MASTER,ACFTREF where MASTER.MFR_MDL_CODE=ACFTREF.CODE AND MASTER.N_NUMBER LIKE '$Serial%' AND MASTER.SERIAL_NUMBER LIKE '$Con%' ORDER BY MASTER.N_NUMBER ); ? table width=100% tr valign=top td colwidth=15%Serial td colwidth=35% align=rightMaufacturer td colwidth=35% align=leftModel td colwidth=15%Con /td/tr ?php if ($row = mysql_fetch_array($result)) { do { print (TR valign=topTD bgcolor=yellowN); print $row['MASTER.N_NUMBER']; print (td); print $row['ACFTREF.MFR_NAME']; print (td); print $row['ACFTREF.TYPE_ACFT']; print (td); print $row['MASTER.SERIAL_NUMBER']; print (p/TD/TR); } while ($row = mysql_fetch_array($result)) ; } else {print Sorry, no results found!;} } ? Just for info, the Master db holds 340,000+ records. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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]
RE: [PHP-DB] please, please can we stop this kind of thing ..... !
-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 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 but wouldn't consider demeaning the poster in this way. please stop doing it; if you feel you need to the refrain from answering and let someone else do it. Steve Some time ago I wrote a little things to the newbies (to be found in the php-news-archive): http://marc.theaimsgroup.com/?l=php-windowsm=99017650207323w=2 Check the @all newbies - section. Please understand the pro's, too ! Happy programming, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -- 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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 PROTECTED] wrote in message 001a01c1297c$08a04810$[EMAIL PROTECTED]">news:001a01c1297c$08a04810$[EMAIL PROTECTED]... -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 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 but wouldn't consider demeaning the poster in this way. please stop doing it; if you feel you need to the refrain from answering and let someone else do it. Steve Some time ago I wrote a little things to the newbies (to be found in the php-news-archive): http://marc.theaimsgroup.com/?l=php-windowsm=99017650207323w=2 Check the @all newbies - section. Please understand the pro's, too ! Happy programming, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -- 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]
RE: [PHP-DB] please, please can we stop this kind of thing ..... !
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 useful, I wanted to do a really basic online searchable database of all the dvds i owned, i was looking thru PHP4, buy choi, kent, lea... you know the one, and couldn't understand at all.. I bought a new book, and it helped a lot more, however, i still wanted to clarify certian things, as it told me to do one thing, and i didn't want it to do that. People like getting information out of other people, its all well and good reading a book, or reading the manual, but if someone can say, this is how you should do it, and it will work, its a lot better than being ignored, or told to read the manual.. sometimes it just doesn't say it the way i want to, so i need help. Its a public mailing list this, if you can help, great, brilliant, thats what we need.. we don't need people to tell us not to do certian things, etc etc. If you don't want to help, don't, just ignore the e mail, and hit the delete button, there is no need to be arrogant or anything like that, cos its not called for... Just my pov.. Marky -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 14:49 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] please, please can we stop this kind of thing . ! 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 PROTECTED] wrote in message 001a01c1297c$08a04810$[EMAIL PROTECTED]">news:001a01c1297c$08a04810$[EMAIL PROTECTED]... -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 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 but wouldn't consider demeaning the poster in this way. please stop doing it; if you feel you need to the refrain from answering and let someone else do it. Steve Some time ago I wrote a little things to the newbies (to be found in the php-news-archive): http://marc.theaimsgroup.com/?l=php-windowsm=99017650207323w=2 Check the @all newbies - section. Please understand the pro's, too ! Happy programming, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -- 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 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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 of this thread is going /dev/null Bye, B. -- 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]
RE: [PHP-DB] please, please can we stop this kind of thing ..... !
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 .. some great tutorials and general info can be found there. Have fun. B. At 15:05 20-8-01 +0100, Mark Milaszkiewicz wrote: 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 useful, I wanted to do a really basic online searchable database of all the dvds i owned, i was looking thru PHP4, buy choi, kent, lea... you know the one, and couldn't understand at all.. I bought a new book, and it helped a lot more, however, i still wanted to clarify certian things, as it told me to do one thing, and i didn't want it to do that. People like getting information out of other people, its all well and good reading a book, or reading the manual, but if someone can say, this is how you should do it, and it will work, its a lot better than being ignored, or told to read the manual.. sometimes it just doesn't say it the way i want to, so i need help. Its a public mailing list this, if you can help, great, brilliant, thats what we need.. we don't need people to tell us not to do certian things, etc etc. If you don't want to help, don't, just ignore the e mail, and hit the delete button, there is no need to be arrogant or anything like that, cos its not called for... Just my pov.. M -- 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]
Re: [PHP-DB] getting ID
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 = $row[0]; return $id; } Ian. Ian Grant [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 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 after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- 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] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- 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: displaying related data from MySQL [SOLVED]
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 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 20, 2001 1:57 PM Subject: displaying related data from MySQL 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 display related data when I display search results. This is the code I've been using (trial and error) but although I get a row for each fount record, I get an error in every table cell. $result=mysql_query (select * from MASTER,ACFTREF where MASTER.MFR_MDL_CODE=ACFTREF.CODE AND MASTER.N_NUMBER LIKE '$Serial%' AND MASTER.SERIAL_NUMBER LIKE '$Con%' ORDER BY MASTER.N_NUMBER ); ? table width=100% tr valign=top td colwidth=15%Serial td colwidth=35% align=rightMaufacturer td colwidth=35% align=leftModel td colwidth=15%Con /td/tr ?php if ($row = mysql_fetch_array($result)) { do { print (TR valign=topTD bgcolor=yellowN); print $row['MASTER.N_NUMBER']; print (td); print $row['ACFTREF.MFR_NAME']; print (td); print $row['ACFTREF.TYPE_ACFT']; print (td); print $row['MASTER.SERIAL_NUMBER']; print (p/TD/TR); } while ($row = mysql_fetch_array($result)) ; } else {print Sorry, no results found!;} } ? Just for info, the Master db holds 340,000+ records. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 ... -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 . ! 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 of this thread is going /dev/null Bye, B. -- 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 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]
RE: [PHP-DB] oracle (oci8) intro
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 linenum, $field_list FROM (SELECT rownum AS linenum, $field_list FROM (SELECT $field_list FROM $table WHERE $where_clause ORDER BY $order_by)) WHERE linenum BETWEEN $min AND $max; I hope it helps, Anthony Carlos -Original Message- From: Graeme Merrall [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 19, 2001 7:34 PM To: Cynic Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] oracle (oci8) intro Quoting Cynic [EMAIL PROTECTED]: Hi there, I'm in a situation where I need to produce a small app on top of an Oracle server really quickly. I'm quite a seasoned developer, but have only experience with MySQL so far. It's my understanding that Oracle lacks the MySQL's LIMIT feature. Looking at the OCI section of the PHP manual, it also looks like there's no OCIDataSeek() or some equivalent. Since the app I need to build will be a standard report builder with paging, I need this functionality. What is the common way to achieve this? Always fetch all rows, cycling through the resultset, discarding the records that preceed the one I want to start displaying with, and quit when I reach the one where the page should end? Is there a PHP + OCI tutorial somewhere? I need an intro to Oracle, and I need it now. :( Thies has an Oracle/PHP tutorial online at http://conf.php.net/ which may be of some assitance. The LIMIT problem is a real bitch is Oracle. There are a few ways to get around it, the most obvious people use being ROWNUM. However, ROWNUM does not listen to sorting which makes life amusing. One option is to try a query like the following: SELECT * FROM (SELECT field1, field2 FROM table WHERE id10 ORDER BY field1 DESC) WHERE ROWNUM11 which gives you 10 rows, but still leaves the question of paging behind unless you use between values. I can't say I've tried paging record sets though. Cheers, Graeme -- 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 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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 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 . ! 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 of this thread is going /dev/null Bye, B. -- 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 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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 Steve Brett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... 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 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 . ! 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 of this thread is going /dev/null Bye, B. -- 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 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 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] simple odbc insert problem
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 tried... with data from form don't work... // connect to system dsn odbc name login and password or die $connect = odbc_connect(DB,name,pword) or die ( not connected); $sql=INSERT INTO basket (Item,Amount,Price) Values ('$id','$amount','$price'); // prepare SQL statement //$sql_prepare = odbc_prepare($connect,$sql) or die(Couldn't prepare query.); // prepare SQL statement $sql_result = odbc_prepare($connect,$sql) or die(Couldn't prepare query.); // execute SQL statement and get results odbc_execute($sql_result) or die(Couldn't execute statement1.); odbc_free_result($sql_result); odbc_close($connect); -- 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]
Re: [PHP-DB] E-Commerce - Integrating Sessions With Charging ProcessesThat rePOST
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, in my experience, the sessions are not restored/recognized until the browser is refreshed on the client side (through the use of JavaScript) to get the server to recognize the request as coming from your user, rather than the as a post from the gateway. I don't want to have to deal with getting sloppy and adding additional refreshes/java script if thats the only way to do it. If I were to merely have the code generate a form based on hidden tags and have javascript auto-form submit, then I would open to security problems, because I could no longer restrict the script the gateway respondes to by an HTTP_REFFER. Whoa there buddy. HTTP_REFERER is supplied by the client's browser... and therefore should be untrusted. If you think it's secure because of what HTTP_REFERER says, you're mistaken. Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 Because the clients order id that is generated will be stored as a session, I need a way to reference the order ID and confirmation code that is returned by the posted data from the gateway, against the session data to start inserting the data into the DB if it was a successful charge. Any ideas...? Maybe there's a quick solution out there I am just overlooking. The solution would be easy if I wasn't inserting all of my data at the end of the process based on the session data. But this is how the code is has to work, so what do you all think, how should I deal with this? Thanks, FT -- 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 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]
Re: [PHP-DB] simple odbc insert problem
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_connect(DB,name,pword) or die ( not connected); $sql=INSERT INTO basket (Item,Amount,Price) Values ('$id','$amount','$price'); Don't put single ticks around a field which holds numerical data... unless you defined your primary ID as a text field (hope not) that's probably why the query is bombing out. // prepare SQL statement //$sql_prepare = odbc_prepare($connect,$sql) or die(Couldn't prepare query.); // prepare SQL statement $sql_result = odbc_prepare($connect,$sql) or die(Couldn't prepare query.); Okay, I've never written PHP to ODBC but making the same call twice and assigning the values to different variables? One of us is confused... // execute SQL statement and get results odbc_execute($sql_result) or die(Couldn't execute statement1.); odbc_free_result($sql_result); odbc_close($connect); Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 -- 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]
Re: [PHP-DB] please, please can we stop this kind of thing ..... !
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 with a newbie's request. just my 2c George, an English newbie in Scotland I definetly agree with you, George! Cody -- 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]
Re: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST
- 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 integrating credit card gateways into PHP code. The first method is one that opens a socket to the gateway server and sends the data from within the code. The second is where FORM data is posted to a https URL with the URL is should send the response back to, with the confirmation code, etc. [snip] Because the clients order id that is generated will be stored as a session, I need a way to reference the order ID and confirmation code that is returned by the posted data from the gateway, against the session data to start inserting the data into the DB if it was a successful charge. You can store the session-id in the return URL. regards -- Jason Wong Gremlins Associates www.gremlins.com.hk -- 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]
RE: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST
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 redirects to, and what form data it posts, it would be quite easy for them to authorize their own charges in my opinion. I think the more I think about this, the POST/REDIRECT type of gateway is pretty hooky. I would like someones input who actually uses this type of gateway and how it is secured and how they maintain their sessions that correlate to that broswer. I think I just need to find a company with more reasonable rates that allow direct socket authorization. Any recommendations on that? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 12:43 PM To: Fotwun; [EMAIL PROTECTED] Subject: Re: [PHP-DB] E-Commerce - Integrating Sessions With Charging Processes That rePOST - 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 integrating credit card gateways into PHP code. The first method is one that opens a socket to the gateway server and sends the data from within the code. The second is where FORM data is posted to a https URL with the URL is should send the response back to, with the confirmation code, etc. [snip] Because the clients order id that is generated will be stored as a session, I need a way to reference the order ID and confirmation code that is returned by the posted data from the gateway, against the session data to start inserting the data into the DB if it was a successful charge. You can store the session-id in the return URL. regards -- Jason Wong Gremlins Associates www.gremlins.com.hk -- 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] PHP+ postgresql help?
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 database setup. I want to be able to search for first names. I'm using $conn = pg_connect (host=localhost user=username password=password bname=dbname); I then have a sql statement setup as such $sql = SELECT * FROM database where lower('$name%') order by last;; I then execute the sql statement pg_Exec ($conn, $sql); Now I want to be able to diplay the results on a page no tables or forms just a simple output I'll work on layout later. I've trying to do so using. pg_result. If anybody could help me I would greatly appreciate it. Thanks guys. -Smileyq -- 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]
Re: [PHP-DB] PHP+ postgresql help?
$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); echo pre; print_r($row); echo /pre; } -- 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]
Re: [PHP-DB] PHP+ postgresql help?
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 = pg_exec($conn, $sql); for ($i = 0; $i pg_numrows($result); $i++) { $row = pg_fetch_array($result, $i); echo pre; print_r($row); echo /pre; } -- 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 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: Multi-Task on PHP by submitting a form!
: 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 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] Multi-Task on PHP by submitting a form!
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 had finish, which will insert the data from the from to mysql_database. Thx Jack [EMAIL PROTECTED] -- 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: [PHP-WIN] Multi-Task on PHP by submitting a form!
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 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 had finish, which will insert the data from the from to mysql_database. Thx Jack [EMAIL PROTECTED] -- PHP Windows 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 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]