[PHP-DB] csv without line feed

2002-03-28 Thread Sommai Fongnamthip
Hi, I have text file with CSV like format (use # sign separate each field) but there did not have any end of line character. This file could open in m$ excel but if I opened it in any text editor it will display in 1 line. How could I handle this file in PHP code? let see the

Re: [PHP-DB] MySQL/PHP Update

2002-03-28 Thread cristi radulescu
i think the problem is bad syntax: you should try: mysql_query("update prod_list set prod_manu=$prod_man where sku='".$prod."'"); that is because when you have single quotes you will not evaluate the expression so your querry will do the update only for sku equally with the string '$prod'... ho

Re: [PHP-DB] csv without line feed

2002-03-28 Thread George Pitcher
Something I used to do about 17-18 years ago to analyse typeseting code was to use DOS's 'Debug'. It gave a hex value for each character in one panel while scrolling thru the file. Compare this against the Excel printout and you should find what code is being used for lf. Hoping that debug is sti

Re: [PHP-DB] csv without line feed

2002-03-28 Thread Sommai Fongnamthip
I have hex text editor which could display hex value for each character. I fould that this text file has only carriage-return (0D) in end of record but other text file had carriage-return with line feed (0D 0A). So, when I open this file with fget or fgetcsv; PHP treat for 1 record or 1 line.

[PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Igor Georgiev
PHP 4.1.2 Apache 1.3.23 Slackware 7.1 Sybase: Adaptive Server Anywhere 8 iODBC - libiodbc-3.0.5 database created with 1251CYR collation work fine with cyrillic strings trough windows app (ODBC) but with PHP on linux trough iODBC & Adaptive Server Anywhere ODBC driver 8.0.x not ODBC.INI-

Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Andrey Hristov
Do you receive "???"s ? Regards, Andrey - Original Message - From: "Igor Georgiev" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 7:11 PM Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215 PHP 4.1.2 Apache 1.3.23 Slackware

Re: [PHP-DB] Reading a file and inserting into Access

2002-03-28 Thread Andrey Hristov
Is it possible Access to load a bunch of SQLs and execute them? If it is possible it is better than CSV. Mysql has a command-line tool for table & database dump into SQLs. Another solution is to look at PHPMyAdmin's code to view how it dumps tables. Best regards, Andrey Hristov - Original

[PHP-DB] Compiling PHP4 with Informix on Red Hat 7.2

2002-03-28 Thread George Karaolides
Hi all, I am trying to compile PHP4 with Informix support on Red Hat Linux 7.2. I am using the latest Red Hat source RPM package: php-4.0.6-12.i386.rpm I am using the latest Informix Client Software Development Kit, which I downloaded from IBM's Informix web site: [root@skynet SPECS]# rpm -q

Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Andrey Hristov
This seems a unicode problem to me. Here we have similar problem when PHP connects to Access 2000 and receives ???s. No problems with Access 97. Are you sure that the data is 1 byte not unicode format? Andrey - Original Message - From: "Igor Georgiev" <[EMAIL PROTECTED]> To: "Andrey Hris

Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Igor Georgiev
SQL Anywhere docs says : Collation label Type Description 1251CYR ANSI Code Page 1251, Windows Cyrillic - Original Message - From: "Andrey Hristov" <[EMAIL PROTECTED]> To: "Igor Georgiev" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 2

[PHP-DB] MS SQL connect

2002-03-28 Thread CID
I'm trying to connect to an MS SQL Server but I'll receive permanetly this message: Warning: MS SQL message: Login failed for user 'mirela'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in d:\inetpub\wwwroot\roslocal\registrums.php on line 24 Warning: MS SQL: Unable

[PHP-DB] Oracle INSERT

2002-03-28 Thread Chris Andrew
Hi, This is probably more of a topic for the Oracle groups - however: This gives me an error: $c1 = ocilogon("chris","chris01"); $sql = "INSERT INTO tblTest VALUES(1,'Test One'),(2,'Test Two')"; $stat= ociparse($c1,$sql); It would appear my INSERT syntax is illegal under Oracle. Qu: How can I

[PHP-DB] Ingres Resultsets

2002-03-28 Thread Christian Azambuja Pagot
Hi All ! I need to keep two resultsets opened at the same time... on Ingres. The records of the outter recordset are used to execute the inner query. I will explain in more detail... Example 1 *** $sql = " se

[PHP-DB] Re: MS SQL connect

2002-03-28 Thread Peter Vereshagin
On Thu, 28 Mar 2002 14:44:23 +0200, Cid <[EMAIL PROTECTED]> wrote: > I'm trying to connect to an MS SQL Server but I'll receive permanetly > this message: > > Warning: MS SQL message: Login failed for user 'mirela'. Reason: Not > associated with a trusted SQL Server connection. (severity 14) in >

RE: [PHP-DB] MySQL/PHP Update

2002-03-28 Thread Rick Emery
Jason, this is intriguing. Please show us a bit more code before the mysql_query() call. -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 1:54 AM To: Php-Db Subject: [PHP-DB] MySQL/PHP Update I'm trying to update my MySQL database, but it doesn't

Re: [PHP-DB] https post using php

2002-03-28 Thread Paul Burney
on 3/27/02 11:45 PM, mailing list at [EMAIL PROTECTED] appended the following bits to my mbox: > I am attempting to POST to a https://whatever.url.com server and return > the result from the server into the script without the user knowing using > a php script. I can not use CURL becuase the shar

[PHP-DB] https post via php

2002-03-28 Thread mailing list
Hello, I am attempting to POST to a https://whatever.url.com server and return the result from the server into the script without the user knowing using a php script. I can not use CURL becuase the shared server I have hosting this site was not compiled -with-curl. I downloaded HTTP_POST PHP sc

Re: [PHP-DB] MySQL/PHP Update

2002-03-28 Thread Jason Wong
On Thursday 28 March 2002 17:04, cristi radulescu wrote: > i think the problem is bad syntax: > you should try: > > mysql_query("update prod_list set prod_manu=$prod_man where > sku='".$prod."'"); > > that is because when you have single quotes you will not evaluate the > expression so your querry

RE: [PHP-DB] MySQL/PHP Update

2002-03-28 Thread Jason
Actually... this turned out to be something totally unrelated. Thanks for all the interest tho. Missing little things like variable spelling is why you shouldn't code for 18 hours straight. Jason Cathcart Check Out My Site: http://www.biohazardous.org -Original Message- From: Rick Emer

[PHP-DB] Re: Oracle INSERT

2002-03-28 Thread Christian Azambuja Pagot
I'm not sure.. but try the folowing statements: $sql = "INSERT INTO tblTest VALUES(1,'Test One') INSERT INTO tblTest VALUES(2,'Test Two') INSERT INTO tblTest VALUES(3,'Test Three') "; (just repeating the insert statement... ) or (repeating the insert statement, separated by semicolon...) $sql

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread Jonathan Hilgeman
> So, maybe this is the question. Can you include a file from > /main/page.php by using a path of /includes/dblib.inc? Probably not. PHP can "see" the whole filesystem, not just the area that is limited to your account. So, when you try to include "/includes/dblib.inc" it is trying to go down to

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread JD Daniels
I have found the best way for me is always include with the fullpath ie, include("/usr/httpd/mysite/include.inc"); or: include($_SERVER['DOCUMENT_ROOT']"/include.inc"); Then you can include files that are elswhere: include("/usr/httpd/virtual-domain-includes/multi-user-include.inc"); th

[PHP-DB] MySQL, PHPand cron

2002-03-28 Thread Jennifer Downey
Hi all, Wondering if anyone might know how to empty a table with a php script and cron job? Would someone point me to a tutorial or help with this? TIA Jennifer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] MySQL, PHPand cron

2002-03-28 Thread Jonathan Hilgeman
First create the PHP script to connect to the database and empty the table ("DELETE FROM table;") as if you were going to visit the page manually every time you wanted to empty the table. This shouldn't be too hard: Once you have that working (test it by visiting the page and then checking to s

RE: [PHP-DB] Oracle INSERT

2002-03-28 Thread Gurhan Ozen
I don't know if you can do in one INSERT INTO statements per se in Oracle, try to separate insert into statements with semicolon(;) .. Or if you will insert the data that is already in another table you can use INSERT INTO ... SELECT ... FROM ... syntax. Gurhan -Original Message- From:

RE: [PHP-DB] MySQL, PHPand cron

2002-03-28 Thread Gurhan Ozen
Hi Jenn, There are a couple ways you can do this. You can write a unix shell script and run it periodically at the cron. Here: #!/bin/mysql query="DELETE FROM tablename" /usr/bin/mysql -u USER -pPASSWORD -D database -e "$query" And then you can just put this script into cron, see: http://www

Re: [PHP-DB] include() statement hell!

2002-03-28 Thread Brad Melendy
Thanks Jonathan, Your suggestions were very helpful, especially turning on the error logging. Here is where I'm at now: Files in use: /include/dblib.inc /include/userlib.inc /main/page.php My include statements in /main/page.php: include("../include/dblib.inc"); include("../include/userlib.inc")

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread Jonathan Hilgeman
This might be your problem: mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 12:06 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] include() statement hell! Thanks Jonathan, Your suggestions were very helpful, especially turning on the error logging. Here is where I'm at now: Files in us

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread Jonathan Hilgeman
You should also put quotes around your keys in your arrays if they're non-numeric. For instance: $session["logged_in"] instead of $session[logged_in] It's good coding habit, and it sometimes will save you from some "constant" headaches (pun intended for everyone who has run into this problem befo

Re: [PHP-DB] include() statement hell!

2002-03-28 Thread Brad Melendy
Man, this means I have to walk around the block with a sign on my back saying, "I'm a %*$&-ASS" for letting that one get by. ;-) Thanks a ton Jonathan. It of course, works now. I think it will be a while before I make that mistake again. ...Brad "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote

RE: [PHP-DB] include() statement hell!

2002-03-28 Thread Jonathan Hilgeman
No problem. I wonder if there's a web-based syntax checker for PHP... - Jonathan -Original Message- From: Brad Melendy [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] include() statement hell! Man, this means I have to walk

Re: [PHP-DB] include() statement hell!

2002-03-28 Thread Brad Melendy
I'll do that Jonathan. I want to thank you again, and everyone else that gave me suggestions. I think I finally understand all the 'rules' about the include statement AND that I've got to keep a close eye on my typos. Thanks once again! ...Brad :-) "Jonathan Hilgeman" <[EMAIL PROTECTED]> wrot

RE: [PHP-DB] https post via php

2002-03-28 Thread Jonathan Hilgeman
The only way I can think of doing this is via cURL, so you'll need to either have the hosting company recompile their PHP with cURL (something any decent hosting company should do - it's not a difficult process), or have them provide an external curl module (like an .so file) so you can use the dl

RE: [PHP-DB] parsing 2 results per row in different 's

2002-03-28 Thread Boaz Yahav
why not simply call $row = mysql_fetch_array($result) again inside the loop? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: valentino [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 1:43 AM To

[PHP-DB] Unknown column 'Test' in 'field list'

2002-03-28 Thread Jennifer Downey
Hi All! Hope I'm not bothering you nice people too much. I have a account called Test, when I click the submit button I get this error Unknown column 'Test' in 'field list' My table only has two fields id and user_name I am not trying to insert the data into the field Test but into usre_name.

[PHP-DB] Unknown column 'Test' in 'field list'

2002-03-28 Thread Jennifer Downey
Never mind I forgot to put ' ' around $u_name in my insert. Jen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Unknown column 'Test' in 'field list'

2002-03-28 Thread David Christensen
Change your query to this and make sure your ID field is set to "auto_increment" INSERT INTO entry (user_name) values ('$name') That'll work for sure! ;-) Jennifer Downey wrote: > Hi All! > > Hope I'm not bothering you nice people too much. > > I have a account called Test, when I click th