Re: [PHP-DB] Update Query?

2001-10-02 Thread Dobromir Velev

Hi,
The query code seems fine to me - did you try to otput $query to see if all
the variables you are using are OK. May be $order,$stationid or $orderNewsID
is misspeled or is not set properly.

HTH
Dobromir


-Original Message-
From: Jay Paulson [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, October 02, 2001 2:22 AM
Subject: [PHP-DB] Update Query?


Hello-
I'm trying to run an update query in an application I'm making.  I keep
getting a MySQL error however when I try and print out the mysql_error()
nothing is returned.  I run the same query in phpMyAdmin and the query runs
fine.  Below is the update query I'm running and the php code that I'm
using
to build it.  Any suggestions?

update news set newsOrder=2 where station_id=5 and id=3

$query = update news set newsOrder=.$order. where station_id=$stationid
and id=.$orderNewsID;

thanks,
jay


--
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]




Odp: [PHP-DB] Yes or No

2001-10-02 Thread Bartek Pawlik

Use boolean field, it takes only values Yes/No, 0/1, True/False.

Bartek Pawlik
Poland


- Original Message -
From: Jordan Elver [EMAIL PROTECTED]
To: MySQL Mailing List [EMAIL PROTECTED]; PHP DB Mailing List
[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:23 AM
Subject: [PHP-DB] Yes or No


 Hi,
 If I wanted to define a table to have a cloumn which is either yes or no
for
 example. Would it be better to use a single char (0 or 1), or can I use an
 enum (I find them more friendly ;)).

 Could you offer some advice?

 Thanks,

 Jord
 --
 Jordan Elver
 Web Developer
 The InternetOne UK Ltd

 --
 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]




-- 

Zagraj z finalistkami
Miss Polonia [ http://miss.onet.pl/start.html ]


-- 
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] Structure Of Imap

2001-10-02 Thread Sharmad Naik

Hi all,
I was trying to develop a appln. using IMAP proto. I found
that lot of  the structures were not defined properly where by i had
problems while inserting the values into the database and also while
extracting them from dbase.
Can anybody give me any reference to the imap structure or any
info related to it as the docs too don't indicate anything (especially
what r the attibutes i can extract from the structure)
-TIA
Sharmad

-- 
`sudo rm -f /bin/laden'
-
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/
What we cannot speak about we must pass over in silence.
   Ludwig Wittgenstein (1889-1951), Austrian philosopher

-- 
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 vs. 2 database softwares

2001-10-02 Thread Andreas Karajannis

Scott Fletcher wrote:
  Do you meant to say that it took me several days to figure out that PHP
  doesn't support multiple databases?  PHP said it will work with almost any
  databases but it failed to meant to say that only with one databases, but
  not multiple databases at the same time.
 

PHP will work with multiple databases, as long as you don't try to use any
of the uodbc based flavors together (Solid, Empress ,iODBC, unixODBC,
Easysoft OOB, OpenLink, Adabas D, Velocis, DBMaker, SAP DB and IBM DB2).

If you need to connect to multiple ODBC databases, use a driver manager such
as iODBC or unixODBC and the appropriate ODBC driver.

  Never mind the problem.  I found that PHP won't use both the
  --with-ibm-db2 option and --with-iobc option, it only can use one of
  them.

As oulined above, instead of using --with-ibm-db2 and --with-iodbc just
use --with-iodbc and create a DSN for your DB2 server with iodbc.

-Andreas

-- 
Andreas Karajannis
mediaworx berlin  AG

Fon (0 30) 2 75 80 - 266
Fax (0 30) 2 75 80 - 200



-- 
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] Yes or No

2001-10-02 Thread Dobromir Velev

Hi,
MySQL doesn't support this kind of fields - if you want to have a field that
have only two values like 0/1 you should use char(1) or enum(0,1).

Dobromir Velev


-Original Message-
From: Bartek Pawlik [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED];
[EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, October 02, 2001 12:57 PM
Subject: Odp: [PHP-DB] Yes or No


Use boolean field, it takes only values Yes/No, 0/1, True/False.

Bartek Pawlik
Poland


- Original Message -
From: Jordan Elver [EMAIL PROTECTED]
To: MySQL Mailing List [EMAIL PROTECTED]; PHP DB Mailing List
[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:23 AM
Subject: [PHP-DB] Yes or No


 Hi,
 If I wanted to define a table to have a cloumn which is either yes or no
for
 example. Would it be better to use a single char (0 or 1), or can I use
an
 enum (I find them more friendly ;)).

 Could you offer some advice?

 Thanks,

 Jord
 --
 Jordan Elver
 Web Developer
 The InternetOne UK Ltd

 --
 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]




--

Zagraj z finalistkami
Miss Polonia [ http://miss.onet.pl/start.html ]


--
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] Format of date retrieved from Oracle8

2001-10-02 Thread Karsten Dambekalns

Hi everybody,

I have a PHP application using an Oracle database. This database has
been built before the application was rewritten in PHP, so I couldn't
switch to MySQL :-/

Now the (small) problem is, in the database is a field of type DATE,
which apparently stores the date _and_ time of the entry. The old
application showed both date _and_ time, PHP just shows the date,
using the exact same SQL.

What might cause this, and how can I change this behaviour?

TIA,
Karsten
-- 
Why do we have to hide from the police, daddy?
Because we use emacs, son. They use vi.
-
mailto:[EMAIL PROTECTED] w³: http://www.k-fish.de/
gpg: http://www.k-fish.de/mykeys.gpg

-- 
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: Multiple upload

2001-10-02 Thread bill

 http://www.php.net/manual/en/features.file-upload.multiple.php

Its Me wrote:

 is there a way i can upload more than one file in the same page
 -ofcourse in 2 different form fields-???

 
 


-- 
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] Format of date retrieved from Oracle8

2001-10-02 Thread Marek Fábry

Just use SQL query like this:

select to_char(date_in_db, 'DD.MM. HH24:MI') as d, next_column from table

Marek F.

 -Original Message-
 From: Karsten Dambekalns [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 2:00 PM
 To: PHP Database
 Subject: [PHP-DB] Format of date retrieved from Oracle8
 
 
 Hi everybody,
 
 I have a PHP application using an Oracle database. This database has
 been built before the application was rewritten in PHP, so I couldn't
 switch to MySQL :-/
 
 Now the (small) problem is, in the database is a field of type DATE,
 which apparently stores the date _and_ time of the entry. The old
 application showed both date _and_ time, PHP just shows the date,
 using the exact same SQL.
 
 What might cause this, and how can I change this behaviour?
 
 TIA,
 Karsten



[PHP-DB] Sybase Stored Procedures

2001-10-02 Thread Thomas Janke

hello,

I would like to use sybase stored procedures and need to know, in what
way they are supportet in PHP. In the manual, one can read that stored
procedures are not yet fully supported. Does anybody have any newer
information on what Sybase features can be used with PHP4?

Thank you very much for your help.

Yours
Thomas

-- 
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] DB2 Performance issue

2001-10-02 Thread Andrew Hill

Okay, one relevant issue is that PHP sets default cursor type to Dynamic.
While this is a nice, potentially bidirectional and sensitive-to-change
cursor it can be very expensive, some ODBC drivers don't support it
(OpenLink's do) and Dynamic cursors typically dont work with tables lacking
a primary key (e.g. views).

To verify that this performance is directly the result of the default cursor
setting, change SQL_CURSOR_DYNAMIC to  SQL_CURSOR_STATIC in php_odbc.c and
recompile.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Mark Newnham [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 5:33 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] DB2 Performance issue


 This was posted on the newsgroup a couple of months ago:


 Christian Szardenings wrote:
 
  Hi Andrew,
 
  thanks a lot for your help. Today we discovered what
  our real problem was:
 
  After playing a little bit with the php-scripts that try
  to connect to the IBM DB2, we set the optional parameter
  Cursortype when calling odbc_pconnect().
 
  And the exciting thing: When we set the cursor type
  to SQL_CUR_USE_ODBC Cursor Type, then
  the whole query speed up from 1 till 10 seconds
  to 0.2 till 0.3 seconds for 100 records. Amazing!!!
 
  Therfore, PHP is just almost fast as calling the DB2
  from Servlets using JDBC (don't take too much care
  about the speed at whole: the database was on a
  completely other location, so the whole connection
  was made over a slow network connection).
 
  I hope this helps when other encounter the same
  problem when trying to connect to DB2 from
  PHP.
 
  Kind regards,
  Christian Szardenings

 This posting has caused some discussion amongst some of us who
 are trying to
 use DB2 in Native mode (i.e. using Unified ODBC) as the IBM driver manager
 appears not to support this parameter. ( An odbc connect with the
 specified
 parameter returns [IBM][CLI Driver] CLI0150E Driver not capable.
 SQLSTATE=S1C00

 Could the author or anyone else who knows, please clarify this posting if
 they are using unified odbc or perhaps a third party ODBC driver.


 TIA

 Mark

 --
 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] Format of date retrieved from Oracle8

2001-10-02 Thread Rouvas Stathis

Hi,

SELECT TO_CHAR(FIELD,'DD/MM/ HH24:MI:SS') FROM TABLE

-Stathis.

Karsten Dambekalns wrote:
 
 Hi everybody,
 
 I have a PHP application using an Oracle database. This database has
 been built before the application was rewritten in PHP, so I couldn't
 switch to MySQL :-/
 
 Now the (small) problem is, in the database is a field of type DATE,
 which apparently stores the date _and_ time of the entry. The old
 application showed both date _and_ time, PHP just shows the date,
 using the exact same SQL.
 
 What might cause this, and how can I change this behaviour?
 
 TIA,
 Karsten
 --
 Why do we have to hide from the police, daddy?
 Because we use emacs, son. They use vi.
 -
 mailto:[EMAIL PROTECTED] w: http://www.k-fish.de/
 gpg: http://www.k-fish.de/mykeys.gpg
 
 --
 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] Format of date retrieved from Oracle8

2001-10-02 Thread Karsten Dambekalns

On Tue, Oct 02, 2001 at 03:39:42PM +0200, Marek Fábry wrote:
 Just use SQL query like this:
 
 select to_char(date_in_db, 'DD.MM. HH24:MI') as d, next_column from table

Thanks, works perfectly :-)

Karsten
-- 
Why do we have to hide from the police, daddy?
Because we use emacs, son. They use vi.
-
mailto:[EMAIL PROTECTED] w³: http://www.k-fish.de/
gpg: http://www.k-fish.de/mykeys.gpg

-- 
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] Free PHP/MySQL webhosting

2001-10-02 Thread Francisco Carvalho

Is there a free web hosting services that support PHP and MySQL?
Thx,
Francisco



RE: [PHP-DB] DB2 Performance issue - More Info

2001-10-02 Thread Mark Newnham

From the IBM CLI Reference:

SQL_ATTR_ODBC_CURSORS (DB2 CLI v5) 
This connection attribute is defined by ODBC, but is not supported by DB2
CLI. Any attempt to set or get this attribute will result in an SQLSTATE of
HYC00 (Driver not capable). 

A 32-bit option specifying how the Driver Manager uses the ODBC cursor
library. 

So I guess this means the message below was related to using a 3rd party
odbc driver.

Shucks..


Regards

Mark


 -Original Message-
 From: Mark Newnham [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 3:33 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] DB2 Performance issue
 
 
 This was posted on the newsgroup a couple of months ago:
 
 
 Christian Szardenings wrote:
  
  Hi Andrew,
  
  thanks a lot for your help. Today we discovered what
  our real problem was:
  
  After playing a little bit with the php-scripts that try
  to connect to the IBM DB2, we set the optional parameter
  Cursortype when calling odbc_pconnect().
  
  And the exciting thing: When we set the cursor type
  to SQL_CUR_USE_ODBC Cursor Type, then
  the whole query speed up from 1 till 10 seconds
  to 0.2 till 0.3 seconds for 100 records. Amazing!!!
  
  Therfore, PHP is just almost fast as calling the DB2
  from Servlets using JDBC (don't take too much care
  about the speed at whole: the database was on a
  completely other location, so the whole connection
  was made over a slow network connection).
  
  I hope this helps when other encounter the same
  problem when trying to connect to DB2 from
  PHP.
  
  Kind regards,
  Christian Szardenings
 
 This posting has caused some discussion amongst some of us 
 who are trying to
 use DB2 in Native mode (i.e. using Unified ODBC) as the IBM 
 driver manager
 appears not to support this parameter. ( An odbc connect with 
 the specified
 parameter returns [IBM][CLI Driver] CLI0150E Driver not capable.
 SQLSTATE=S1C00
 
 Could the author or anyone else who knows, please clarify 
 this posting if
 they are using unified odbc or perhaps a third party ODBC driver.
 
 
 TIA
 
 Mark
 
 -- 
 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: PHP and MS Access

2001-10-02 Thread John Lim

You shouldn't need to install MySQL to use MS Access. Seems like they are
giving you excuses to avoid any extra work on their part. I would suggest
you switch web-hosting companies if they are behaving this way.

Hostpro.com is one that supports PHP and Access.

PS: I am not affiliated to hostpro in any way accept as a satisfied
customer.

Regards, John

Djgray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I apologize if this is a redundant post. I did do a search and could not
 find the answer.

 I'm swimming in ignorance as I build a website for a friend. The hosting
 service says they support MS Access and PHP. However, they are telling me
 that in order for PHP to get to that database, I would also need MySQL,
 which they do not have and have no plans to install.

 Is this accrate?

 Can PHP not get to the Access database directly?





-- 
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] DB2 Performance issue - More Info

2001-10-02 Thread John Lim

Hi Mark,

Thanks for the investigation! Will add your comment to the db2 drivers of
adodb.

Regards, John


Mark Newnham [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 From the IBM CLI Reference:

 SQL_ATTR_ODBC_CURSORS (DB2 CLI v5)
 This connection attribute is defined by ODBC, but is not supported by DB2
 CLI. Any attempt to set or get this attribute will result in an SQLSTATE
of
 HYC00 (Driver not capable).

 A 32-bit option specifying how the Driver Manager uses the ODBC cursor
 library.

 So I guess this means the message below was related to using a 3rd party
 odbc driver.

 Shucks..


 Regards

 Mark


  -Original Message-
  From: Mark Newnham [mailto:[EMAIL PROTECTED]]
  Sent: Monday, October 01, 2001 3:33 PM
  To: '[EMAIL PROTECTED]'
  Subject: [PHP-DB] DB2 Performance issue
 
 
  This was posted on the newsgroup a couple of months ago:
 
 
  Christian Szardenings wrote:
  
   Hi Andrew,
  
   thanks a lot for your help. Today we discovered what
   our real problem was:
  
   After playing a little bit with the php-scripts that try
   to connect to the IBM DB2, we set the optional parameter
   Cursortype when calling odbc_pconnect().
  
   And the exciting thing: When we set the cursor type
   to SQL_CUR_USE_ODBC Cursor Type, then
   the whole query speed up from 1 till 10 seconds
   to 0.2 till 0.3 seconds for 100 records. Amazing!!!
  
   Therfore, PHP is just almost fast as calling the DB2
   from Servlets using JDBC (don't take too much care
   about the speed at whole: the database was on a
   completely other location, so the whole connection
   was made over a slow network connection).
  
   I hope this helps when other encounter the same
   problem when trying to connect to DB2 from
   PHP.
  
   Kind regards,
   Christian Szardenings
 
  This posting has caused some discussion amongst some of us
  who are trying to
  use DB2 in Native mode (i.e. using Unified ODBC) as the IBM
  driver manager
  appears not to support this parameter. ( An odbc connect with
  the specified
  parameter returns [IBM][CLI Driver] CLI0150E Driver not capable.
  SQLSTATE=S1C00
 
  Could the author or anyone else who knows, please clarify
  this posting if
  they are using unified odbc or perhaps a third party ODBC driver.
 
 
  TIA
 
  Mark
 
  --
  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] connecting SQL 7.0

2001-10-02 Thread LeTortorec, Jean-Louis

$a=odbc_connect(mydsn,myid,mypwd) or die(Database is down);
echo $a;
 
 
When I execute this script, I got $a being Resource id #1.
but  $a should be an integer in order to do a query like
$b=odbc_exec($a,select * from mytable);
 
 
the dsn I created is a system DSN, as suggested my a member of the mailing
list.
I run PHP4.0 and Apache 1.3 under W2000.
 
Any suggestion?
 
Thanks.




RE: [PHP-DB] connecting SQL 7.0

2001-10-02 Thread Andrew Hill

If you attempt to echo out a Resource Id it tells you it's name :)
This should still work in an exec.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 2:10 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] connecting SQL 7.0


 $a=odbc_connect(mydsn,myid,mypwd) or die(Database is down);
 echo $a;


 When I execute this script, I got $a being Resource id #1.
 but  $a should be an integer in order to do a query like
 $b=odbc_exec($a,select * from mytable);


 the dsn I created is a system DSN, as suggested my a member of the mailing
 list.
 I run PHP4.0 and Apache 1.3 under W2000.

 Any suggestion?

 Thanks.




-- 
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] connecting SQL 7.0

2001-10-02 Thread LeTortorec, Jean-Louis

Here is the full script:

$a=odbc_connect(mydsn,myid,mypwd) or die(Database is down); 
echo $a;
$b=odbc_exec($a,select * from mytable);
echo odbc_error ();

FYI, if I execute only the first 2 lines, there is no problem, meaning that
the server is accesssible ($a is Resource id #1).

When the whole script is executed with Internet Explorer, a windows pops up
and says: The connection with the server was reset.

When executed with Opera, the window says: Repeated attemps failed to load
this page completely.  Them may be a problem on the server.

the echo odbc_error() does not help.


The Apache server, and php pages are on my PC (localhost) connected to a
LAN, and the SQL Server is on a NT server on the LAN.  The dsn odbc driver
is on my PC.


What's wrong here and what should I change?

Thanks to all for your inputs.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 02, 2001 2:05 PM
To: LeTortorec, Jean-Louis; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] connecting SQL 7.0


If you attempt to echo out a Resource Id it tells you it's name :) This
should still work in an exec.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 2:10 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] connecting SQL 7.0


 $a=odbc_connect(mydsn,myid,mypwd) or die(Database is down); 
 echo $a;


 When I execute this script, I got $a being Resource id #1. but  $a 
 should be an integer in order to do a query like 
 $b=odbc_exec($a,select * from mytable);


 the dsn I created is a system DSN, as suggested my a member of the 
 mailing list. I run PHP4.0 and Apache 1.3 under W2000.

 Any suggestion?

 Thanks.



-- 
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] connecting SQL 7.0

2001-10-02 Thread Andrew Hill

Does this DSN test successfully in the ODBC Administrator?
If so, try an odbc trace - see what's going on.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers



 -Original Message-
 From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 2:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [PHP-DB] connecting SQL 7.0


 Here is the full script:

   $a=odbc_connect(mydsn,myid,mypwd) or die(Database is down);
   echo $a;
   $b=odbc_exec($a,select * from mytable);
   echo odbc_error ();

 FYI, if I execute only the first 2 lines, there is no problem,
 meaning that
 the server is accesssible ($a is Resource id #1).

 When the whole script is executed with Internet Explorer, a
 windows pops up
 and says: The connection with the server was reset.

 When executed with Opera, the window says: Repeated attemps
 failed to load
 this page completely.  Them may be a problem on the server.

 the echo odbc_error() does not help.


 The Apache server, and php pages are on my PC (localhost) connected to a
 LAN, and the SQL Server is on a NT server on the LAN.  The dsn odbc driver
 is on my PC.


 What's wrong here and what should I change?

 Thanks to all for your inputs.


 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 2:05 PM
 To: LeTortorec, Jean-Louis; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] connecting SQL 7.0


 If you attempt to echo out a Resource Id it tells you it's name :) This
 should still work in an exec.

 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Data Integration Technology Providers

  -Original Message-
  From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 02, 2001 2:10 PM
  To: '[EMAIL PROTECTED]'
  Subject: [PHP-DB] connecting SQL 7.0
 
 
  $a=odbc_connect(mydsn,myid,mypwd) or die(Database is down);
  echo $a;
 
 
  When I execute this script, I got $a being Resource id #1. but  $a
  should be an integer in order to do a query like
  $b=odbc_exec($a,select * from mytable);
 
 
  the dsn I created is a system DSN, as suggested my a member of the
  mailing list. I run PHP4.0 and Apache 1.3 under W2000.
 
  Any suggestion?
 
  Thanks.
 
 

 --
 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] Free PHP/MySQL webhosting

2001-10-02 Thread Rick Emery

start here: http://www.freewebspace.net/


-Original Message-
From: Francisco Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 11:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Free PHP/MySQL webhosting


Is there a free web hosting services that support PHP and MySQL?
Thx,
Francisco

-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen

Hello,

How can i make a double LEFT JOIN?

Now i have got:

SELECT table1.id FROM table1 LEFT JOIN (table2 LEFT JOIN table3 ON
table2.id=table3.id) ON table1.id=table2.id

but this gives an error

Tnx,

Bas


-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery

Remove the parentheses

SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON
table2.id=table3.id ON table1.id=table2.id

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 3:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Howto make a double LEFT JOIN


Hello,

How can i make a double LEFT JOIN?

Now i have got:

SELECT table1.id FROM table1 LEFT JOIN (table2 LEFT JOIN table3 ON
table2.id=table3.id) ON table1.id=table2.id

but this gives an error

Tnx,

Bas


-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen

 Remove the parentheses
 SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON
 table2.id=table3.id ON table1.id=table2.id

I still got:
MySQL retourneerde: You have an error in your SQL syntax near 'LEFT JOIN
table3 ON
table2.id=table3.id ON table1.id=table2.id' at line 1


-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery

SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT
JOIN table3 ON table2.id=table3.id

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 3:13 PM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Howto make a double LEFT JOIN


 Remove the parentheses
 SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON
 table2.id=table3.id ON table1.id=table2.id

I still got:
MySQL retourneerde: You have an error in your SQL syntax near 'LEFT JOIN
table3 ON
table2.id=table3.id ON table1.id=table2.id' at line 1

-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen

 SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT
 JOIN table3 ON table2.id=table3.id

Well, oke now i have:
table1:
id|no
1|1
2|1

table2:
id|no
1|1
1||1

table2:
id|no
1|1
1||1
1||1

The result i want tot have is:
id|sum(table2.no)|sum(table3.no)|
1|2|3
2|0|0
my query:

SELECT DISTINT( table1.id) AS test, SUM(table2.no) AS tot, SUM(table3.no
FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON
table2.id=table3.id GROUP BY test ORDER BY tot DESC

which give my something like:
id|5|5|
1|2|3
2|0|0
:(






- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Bas Jobsen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 10:19 PM
Subject: RE: [PHP-DB] Howto make a double LEFT JOIN


 SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT
 JOIN table3 ON table2.id=table3.id

 -Original Message-
 From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 3:13 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Howto make a double LEFT JOIN


  Remove the parentheses
  SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON
  table2.id=table3.id ON table1.id=table2.id

 I still got:
 MySQL retourneerde: You have an error in your SQL syntax near 'LEFT JOIN
 table3 ON
 table2.id=table3.id ON table1.id=table2.id' at line 1

 --
 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] Trouble retrieving DATETIME info from MSSQL - resolved

2001-10-02 Thread Matthew DeChant

Dates in MSSQL are stored as:
mon dd  hh:miAM (or PM)

and ODBC converts them to:
-mm-dd hh:mi:ss.mmm(24h)

so:
select * from Internetlog where convert(varchar, LogTime, 121) like
'%2001-10-02%'

-Original Message-
From: Matthew DeChant [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Trouble retrieving DATETIME info from MSSQL


Hello,

I am having trouble getting data from a DATETIME field in MSSQL 7.0.

The data in a general select query look like this:

2001-09-25 14:23:17.000


I can do this in MSSQL:

select * from INTERNETLOG where Datetime like %2001%

but not this:

select * from INTERNETLOG where Datetime like %2001/09/25%
or
select * from INTERNETLOG where Datetime like %20010925%
or
select * from INTERNETLOG where Datetime like %2001/09%
or
select * from INTERNETLOG where Datetime like %14:23%



-- 
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] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen

Hi Rick,

 please show the REAL output from your query and what it should REALLY look
 like

 table1:
 id|no
1|1
2|1

table2:
id|no
1|1
1|1

 table3:
id|no
1|1
1|1
1|1

using:
SELECT DISTINCT(table1.id) AS test, SUM(table2.no) AS tot, SUM(table3.no)
FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON
table2.id=table3.id GROUP BY test ORDER BY tot DESC

gives:
test|tot|SUM(table3.no)
1|6|6
2|0|0

and i want to have:
test|tot|SUM(table3.no)
1|2|3
2|0|0

Tnx,

Bas






- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Bas Jobsen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:11 PM
Subject: RE: [PHP-DB] Howto make a double LEFT JOIN


 please show the REAL output from your query and what it should REALLY look
 like

 -Original Message-
 From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 3:38 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Howto make a double LEFT JOIN


  SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id
LEFT
  JOIN table3 ON table2.id=table3.id

 Well, oke now i have:
 table1:
 id|no
 1|1
 2|1

 table2:
 id|no
 1|1
 1||1

 table2:
 id|no
 1|1
 1||1
 1||1

 The result i want tot have is:
 id|sum(table2.no)|sum(table3.no)|
 1|2|3
 2|0|0
 my query:

 SELECT DISTINT( table1.id) AS test, SUM(table2.no) AS tot, SUM(table3.no
 FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON
 table2.id=table3.id GROUP BY test ORDER BY tot DESC

 which give my something like:
 id|5|5|
 1|2|3
 2|0|0
 :(






 - Original Message -
 From: Rick Emery [EMAIL PROTECTED]
 To: 'Bas Jobsen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, October 02, 2001 10:19 PM
 Subject: RE: [PHP-DB] Howto make a double LEFT JOIN


  SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id
LEFT
  JOIN table3 ON table2.id=table3.id
 
  -Original Message-
  From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 02, 2001 3:13 PM
  To: Rick Emery; [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Howto make a double LEFT JOIN
 
 
   Remove the parentheses
   SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON
   table2.id=table3.id ON table1.id=table2.id
 
  I still got:
  MySQL retourneerde: You have an error in your SQL syntax near 'LEFT JOIN
  table3 ON
  table2.id=table3.id ON table1.id=table2.id' at line 1
 
  --
  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] Securing PHP functions and abilties with Virtual Hosts

2001-10-02 Thread Siggy

Hi,

I run a webhosting service and am about to offer MySQL to .PHP customers; and 
am wondering if there is a way with in Apache Virtual Host directives to ...

-  enable/disable safe mode (we have some scripts on our https server and we 
need to be able to set up new websites etc, but we want to secure all 
customer sites, or is it better to make the owner of such scripts root, so 
the less exploits occur?)

- enable/disable specific functions it would be nice to disable mysql_* 
functions, so even if they got someone's password to a database, they can't 
exactly do a whole lot! :) Perhaps that could be done by a 'use this php.ini' 
directive?

- also, what is the directive to disable the php enging for a site? 
php_engine off wasn't understood by Apache.

Is this possible without running multiple httpd daemons etc?

Running Redhat 7.1, Apache 1.3.19/PHP 4.0.4.

Any suggestions in improving security as a whole is appreciated.

Thanks heaps,

Sigurd Magnusson

-- 
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] Storing HTML in database

2001-10-02 Thread Nally, Tyler G.

Hello,

I'm trying to store HTML (that is cut-n-paste from source)
into a textarea field on a web page.  As it's submitted to
the php page that processes it, the database column that
it ends up with strips the  and  out of the html
so that it doesn't end up in the source.  

Example I can cut-n-paste... the following into a textarea...

--original test html code
ithis is supposed to be in italics/i
bthis is supposed to be bold/b
table
 tr
   td align=left valign=topColumn 1, Row 1/td
   td align=left valign=topColumn 2, Row 1/td
 /tr
 tr
   td align=left valign=topColumn 1, Row 2/td
   td align=left valign=topColumn 2, Row 2/td
 /tr
/table
-

... and process it with htmlentities() by the receiving php page 
as it will show...

original code as received and displayed in php processing page--
ithis is supposed to be in italics/i
bthis is supposed to be bold/b
table
 tr
   td align=\left\ valign=\top\Column 1, Row 1/td
   td align=\left\ valign=\top\Column 2, Row 1/td
 /tr
 tr
   td align=\left\ valign=\top\Column 1, Row 2/td
   td align=\left\ valign=\top\Column 2, Row 2/td
 /tr
/table
-

Which I can deal with easily enough... but when the same 
is posted, processed (w/ htmlentities), and retrieved from the
MySQL database, I receive the following 

--original code as retrieved from database--
 i this is supposed to be in italics /i 
 b this is supposed to be bold /b
 table
 tr
   td align=\left\ valign=\top\ Column 1, Row 1 /td
   td align=\left\ valign=\top\ Column 2, Row 1 /td
 /tr
 tr
   td align=\left\ valign=\top\ Column 1, Row 2 /td
   td align=\left\ valign=\top\ Column 2, Row 2 /td
 /tr
/table


What am I doing wrong?  This just can't be rocket science.
There's probably something essential that I'm missing.

Thanks much
--
__   _Tyler Nally
   / /__   _(_)___       _ _  [EMAIL PROTECTED]
  / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/  317-860-3009
 / /  __/ /_/ / / /_/ / / / // /_/ / /  / /_/ /   American Legion Website
/_/\___/\__, /_/\/_/ /_(_)/_/   \__, /http://www.legion.org
   //  //   

-- 
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] Cybercash? or Who?

2001-10-02 Thread Jason Caldwell

Does anyone have any recommendations on a Credit Card Processing solution to
use with PHP?  I researched CyberCash's CashRegister deal about 6 months
ago -- now Verisign has taken over CyberCash, and have replaced CashRegister
with PayFlowPro --

Looking at the pricing, etc... don't know if it was a better deal than
CashRegister... not that it matters anymore :-)

I'm basically looking to not get raped with Merchant and Monthly fees... but
still get a good, quick and reliable processing package.

Thanks.
Jason
[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] HTML or PHP?

2001-10-02 Thread Jason Caldwell

I have a problem that seems like it should be a snap to fix, but leaves me
feeling frustrated to no end...

I have a table (HTML) -- 2 Columns.  In the right-hand column I store a URL
(ie. http://someonesdomainname.com/path/anotherpath/file.html)

The problem is -- when I pull the URL in -- it *pushes* my columns around
and expands my table beyond the page -- I have my table hard set at 600
pixels (not 100%) --

How can I force the URL (or any text for that matter that doesn't have
spaces in it) -- to *wrap*??  Can I do this with HTML (I hope) or do I need
to write some PHP code to force break the string into workable sections?

Thanks.
[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] PayFlowPro?

2001-10-02 Thread Jason Caldwell

How can I get Versign's PayFlowPro to work with PHP?  I'm using Win2k
version.

Thanks.
Jason
[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] HTML or PHP?

2001-10-02 Thread Beau Lebens

not that this has *anything* to do with databases, but try the nowrap
directive in the td containing the URL, i don't think it will work,
otherwise you will need to use something like the PHP function wordwrap()

enjoy

/beau

// -Original Message-
// From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 3 October 2001 7:20 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] HTML or PHP?
// 
// 
// I have a problem that seems like it should be a snap to fix, 
// but leaves me
// feeling frustrated to no end...
// 
// I have a table (HTML) -- 2 Columns.  In the right-hand 
// column I store a URL
// (ie. http://someonesdomainname.com/path/anotherpath/file.html)
// 
// The problem is -- when I pull the URL in -- it *pushes* my 
// columns around
// and expands my table beyond the page -- I have my table hard 
// set at 600
// pixels (not 100%) --
// 
// How can I force the URL (or any text for that matter that 
// doesn't have
// spaces in it) -- to *wrap*??  Can I do this with HTML (I 
// hope) or do I need
// to write some PHP code to force break the string into 
// workable sections?
// 
// Thanks.
// [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]




RE: [PHP-DB] Storing HTML in database

2001-10-02 Thread Beau Lebens

try using the htmlspecialchars() function instead - works for me :)

// -Original Message-
// From: Nally, Tyler G. [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 3 October 2001 6:29 AM
// To: '[EMAIL PROTECTED]'
// Subject: [PHP-DB] Storing HTML in database
// 
// 
// Hello,
// 
// I'm trying to store HTML (that is cut-n-paste from source)
// into a textarea field on a web page.  As it's submitted to
// the php page that processes it, the database column that
// it ends up with strips the  and  out of the html
// so that it doesn't end up in the source.  
// 
// Example I can cut-n-paste... the following into a textarea...
// 
// --original test html code
// ithis is supposed to be in italics/i
// bthis is supposed to be bold/b
// table
//  tr
//td align=left valign=topColumn 1, Row 1/td
//td align=left valign=topColumn 2, Row 1/td
//  /tr
//  tr
//td align=left valign=topColumn 1, Row 2/td
//td align=left valign=topColumn 2, Row 2/td
//  /tr
// /table
// -
// 
// ... and process it with htmlentities() by the receiving php page 
// as it will show...
// 
// original code as received and displayed in php 
// processing page--
// ithis is supposed to be in italics/i
// bthis is supposed to be bold/b
// table
//  tr
//td align=\left\ valign=\top\Column 1, Row 1/td
//td align=\left\ valign=\top\Column 2, Row 1/td
//  /tr
//  tr
//td align=\left\ valign=\top\Column 1, Row 2/td
//td align=\left\ valign=\top\Column 2, Row 2/td
//  /tr
// /table
// -
// 
// 
// Which I can deal with easily enough... but when the same 
// is posted, processed (w/ htmlentities), and retrieved from the
// MySQL database, I receive the following 
// 
// --original code as retrieved from 
// database--
//  i this is supposed to be in italics /i 
//  b this is supposed to be bold /b
//  table
//  tr
//td align=\left\ valign=\top\ Column 1, Row 1 /td
//td align=\left\ valign=\top\ Column 2, Row 1 /td
//  /tr
//  tr
//td align=\left\ valign=\top\ Column 1, Row 2 /td
//td align=\left\ valign=\top\ Column 2, Row 2 /td
//  /tr
// /table
// -
// ---
// 
// What am I doing wrong?  This just can't be rocket science.
// There's probably something essential that I'm missing.
// 
// Thanks much
// --
// __   _Tyler Nally
/// /__   _(_)___       _ _  [EMAIL PROTECTED]
//   / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/  317-860-3009
//  / /  __/ /_/ / / /_/ / / / // /_/ / /  / /_/ /   American 
// Legion Website
// /_/\___/\__, /_/\/_/ /_(_)/_/   \__, /
http://www.legion.org
   //  //   

-- 
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] Check Boxes/UPDATE

2001-10-02 Thread Matt C

I have a page of jobs with AuthStatus set to 0. Basically I want to list 
each job title with a checkbox next to it. This I have done.

What I really don't understand is how do I make it so that the rows in my 
table for all the different records when ticked are updated to 1?

Please help.

Matt

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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] Check Boxes/UPDATE

2001-10-02 Thread Dave Watkinson

Hiya Matt

you have to set the value of the checkbox to 1, and give it a unique
name.

if the user has checked the box when they submit the form then the
checkbox' name will have a value of 1. if they didn't check it it won't
have a value at all.


Hope this helps!


Dave


-Original Message-
From: Matt C [mailto:[EMAIL PROTECTED]]
Sent: 03 October 2001 03:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Check Boxes/UPDATE


I have a page of jobs with AuthStatus set to 0. Basically I want to list

each job title with a checkbox next to it. This I have done.

What I really don't understand is how do I make it so that the rows in
my 
table for all the different records when ticked are updated to 1?

Please help.

Matt

_
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp


-- 
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] Cybercash? or Who?

2001-10-02 Thread Dan Harrington

Go payflow pro.  Its awesome.  Substantially the fastest
processor out there in my opinion.

I use it with PHP and its awesome.  I've used Miva, 
Cybercash (before it was Verisign), and many others.



 -Original Message-
 From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 5:15 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Cybercash? or Who?
 
 
 Does anyone have any recommendations on a Credit Card Processing solution to
 use with PHP?  I researched CyberCash's CashRegister deal about 6 months
 ago -- now Verisign has taken over CyberCash, and have replaced CashRegister
 with PayFlowPro --
 
 Looking at the pricing, etc... don't know if it was a better deal than
 CashRegister... not that it matters anymore :-)
 
 I'm basically looking to not get raped with Merchant and Monthly fees... but
 still get a good, quick and reliable processing package.
 
 Thanks.
 Jason
 [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]




Re: [PHP-DB] Check Boxes/UPDATE

2001-10-02 Thread Jason G.

Matt,

Assuming that you have a variable number of records being displayed out of 
the database:

As you write out the HTML, give each checkbox a name containing the ID# of 
the record that is being written out.  Ex:
input type=check name=chkAuthStatus_1203 checked
input type=check name=chkAuthStatus_1204 checked
input type=check name=chkAuthStatus_1205 checked


Use code like the following to Write and Read the web form...

?php

//Get the DB result
$dbResult = mysql_query(SELECT id, authstatus, whatever, whatever2 FROM 
table WHERE whatever);

//Get the row count
$nRowCount = mysql_num_rows($dbResult);

//Scan the result
for($i=0; $i$nRowCount; $i++)
{
 //Get the current row as an object
 $oRow = mysql_fetch_object($dbResult);

 //Format the checkbox name
 $sCheckName = chkAuthStatus_ . $oRow-id;

 //When Writing out the Web Form, use this
 $sChecked = ($oRow-authstatus ? ' checked' : '');
 echo input type=\check\ name=\$sCheckName\$sChecked;


 //When Reading in the web form, use this
 //If the checkbox variable isset(checked) then set the 
authstatus=1
 //Otherwise set the authstat= 0
 $authstatus = (isset($$sCheckName) ? 1 : 0);

 //Update the database
 mysql_query(UPDATE table SET authstatus=$authstatus WHERE 
id=$oRow-id);
}

?

-Jason Garber
www.IonZoft.com


At 03:22 AM 10/3/2001 +0100, Matt C wrote:
I have a page of jobs with AuthStatus set to 0. Basically I want to list 
each job title with a checkbox next to it. This I have done.

What I really don't understand is how do I make it so that the rows in my 
table for all the different records when ticked are updated to 1?

Please help.

Matt

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
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: Free PHP/MySQL webhosting

2001-10-02 Thread _lallous

www.f2s.com
www.freesql.org

Francisco Carvalho [EMAIL PROTECTED] wrote in message
1193DA4C9CB3D411A2BB000102CAA88EF406BF@MAIL2">news:1193DA4C9CB3D411A2BB000102CAA88EF406BF@MAIL2...
 Is there a free web hosting services that support PHP and MySQL?
 Thx,
 Francisco




-- 
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] HTML or PHP?

2001-10-02 Thread Dobromir Velev

Hi,
Just set the width of the cell the URL is placed in.
Something like
trtd width='300'$url/tdtd width='300'.../td/tr

HTH
Dobromir Velev

-Original Message-
From: Jason Caldwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 03, 2001 2:20 AM
Subject: [PHP-DB] HTML or PHP?


I have a problem that seems like it should be a snap to fix, but leaves me
feeling frustrated to no end...

I have a table (HTML) -- 2 Columns.  In the right-hand column I store a URL
(ie. http://someonesdomainname.com/path/anotherpath/file.html)

The problem is -- when I pull the URL in -- it *pushes* my columns around
and expands my table beyond the page -- I have my table hard set at 600
pixels (not 100%) --

How can I force the URL (or any text for that matter that doesn't have
spaces in it) -- to *wrap*??  Can I do this with HTML (I hope) or do I need
to write some PHP code to force break the string into workable sections?

Thanks.
[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]




RE: [PHP-DB] HTML or PHP?

2001-10-02 Thread Matthew Loff


Without spaces, the URL won't line break...

I recommend one of two things...

1) Use a for() or while() loop with substr(), to print out, say, 50
characters per line, then break to the next line, until reaching the end
of the string...

2) Use an ellipsis (...) to cut out the middle of the URL if it's too
long...  Example:

echo A HREF=\$url\. (strlen($url)  50? substr($url, 0,
20).substr($url, -20) : $url) ./A\n;

That will shorten:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/long/url/goes/here/blah/blah/blah//A

To something like: 

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere...here/blah/blah/blah//A


If you wanted more accurate simplifying of URL displays with an
ellipsis, you could explode() the URL, using the slash '/' as the
delimeter...  But that's a bit more complicated to implement from that
point on...  Doing it that way, you could turn:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/long/url/goes/here/blah/blah/blah//A

Into:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/.../blah//A


Good luck with whatever method you choose.
--Matt


-Original Message-
From: Dobromir Velev [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 2:13 AM
To: Jason Caldwell; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] HTML or PHP?


Hi,
Just set the width of the cell the URL is placed in.
Something like
trtd width='300'$url/tdtd width='300'.../td/tr

HTH
Dobromir Velev

-Original Message-
From: Jason Caldwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 03, 2001 2:20 AM
Subject: [PHP-DB] HTML or PHP?


I have a problem that seems like it should be a snap to fix, but leaves

me feeling frustrated to no end...

I have a table (HTML) -- 2 Columns.  In the right-hand column I store a

URL (ie. http://someonesdomainname.com/path/anotherpath/file.html)

The problem is -- when I pull the URL in -- it *pushes* my columns 
around and expands my table beyond the page -- I have my table hard set

at 600 pixels (not 100%) --

How can I force the URL (or any text for that matter that doesn't have 
spaces in it) -- to *wrap*??  Can I do this with HTML (I hope) or do I 
need to write some PHP code to force break the string into workable 
sections?

Thanks.
[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 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]