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
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
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
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 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-
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
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
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
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
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
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
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
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
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
>
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
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
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
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
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
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
> 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
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
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
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
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:
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
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")
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
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
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
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
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
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
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
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.
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
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
37 matches
Mail list logo