RE: [PHP-DB] password / email

2001-02-21 Thread Allsebrook_Richard/askr
 BDY.RTF

-- 
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] Setting cookies that are valid for two or more domains

2001-02-21 Thread Trond Erling Hundal

Hey there...
I need to set a cookie with variables that will be valid for two domains
with different names.
In reality these two domains are on the same server, and even in the same
dir

we use: php4, apache, Linux


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

2001-02-21 Thread s.budd

moreover , even if they cant see the text of the page,  Your password is
going over  the internet in plain  text.

-Original Message-
From: Don [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 7:24 PM
To: php-db list
Subject: [PHP-DB] PHP security


I am writing aome PHP scripts to connect to a MySQL database.  In order
to connect, I have found the following documented code:

$dbLink = mysql_connect("localhost", "my_user", "my_password")

Here, the password is plain text.  This does not seem very secure to
me.  What is to prevent someone using a program like Frontpage to
download my web and discover my password?



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

2001-02-21 Thread s.budd


But if the database is on another machine then the password is sent as plain
text over the internet, no?




-Original Message-
From: Ben Cairns [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 10:06 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] PHP security


Anything contained within the PHP open  close Tags (? ? ) is parsed out 
server side.

In order for them to read the source of the file, they must have console 
access.

Try and get a password from www.mywapfone.net/index.php

That page does a DB connect using your script.

You cannot see my Password in the source right?

Does this answer your question?

As the MySQL server is on localhost, then the password never leaves the 
machine, so is not travelling over the internet.

Therefore, no-one can packet grab from the machine to get the password.

-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK.."


-- 
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] Is there a PHP equivalent of DATE_FORMAT ?

2001-02-21 Thread php3

Addressed to: "Timothy Wright" [EMAIL PROTECTED]
  [EMAIL PROTECTED]



 I need to convert the input to a valid timestamp first.

 Any ideas?? Am I missing something really obvious...it's late and my brain
 is tired..

Read the MySQL manual, section  7.4.11 Date and Time Functions

http://www.mysql.com/doc/D/a/Date_and_time_functions.html


You can convert a MySQL date to a Unix Timestamp, with UNIX_TIMESTAMP,
but the real answer to your problem is:

Just because MySQL returns it, that doesn't mean you have to print it.


It does not cost that much to return a duplicate date on every record.

You are going to be returning a unix timestamp on every record, and the
fact of the matter that converting the internal date format to a uniz
timestamp is as much a date formatting operation as DATE_FORMAT().

So, go ahead and use MySQL to format the value, and only print it the
first time it appears.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.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] PHP security

2001-02-21 Thread php3

Addressed to: "s.budd" [EMAIL PROTECTED]
  [EMAIL PROTECTED]

** Reply to note from "s.budd" [EMAIL PROTECTED] Wed, 21 Feb 2001 10:03:33 -


 But if the database is on another machine then the password is sent as plain
 text over the internet, no?

No.  MySQL encrypts the password when it sends it from the client to the
server.

Also, in most cases where the db and the web server are separate
machines they are on the same subnet, in the same building, and the
packets never make it past the first switch or router they encounter.

If you want serious security, put a second set of network cards in the
web servers and create a special network that only connects them to the
database server, and disconnect the db server from the Internet.  Make
sure IP forwarding is OFF in the web servers and you have one more
thing a hacker has to get thru to see what is in the database.







Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.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]




[PHP-DB] php.mysql

2001-02-21 Thread Ramiro Radjiman

 i have this code.

function create_mysqltable($db_name,$table_name){
mysql_select_db($db_name);
 $sql_query = "CREATE TABLE IF NOT EXISTS $table_name "
 . "(  id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, "
 . "   soort char(20), "
 . "   aantal varchar(20) DEFAULT '0', "
 . "   str_men varchar(20) DEFAULT '0', "
 . "   recht varchar(20) DEFAULT '0', "
 . "   rechtverstek varchar(20) DEFAULT '0', "
 . "   verstekgelijk varchar(20) DEFAULT '0', "
 . "   verstekongelijk varchar(20) DEFAULT '0', "
 . "   PRIMARY KEY (id), "
 . "   UNIQUE id (id))";
 mysql_query($sql_query)
  or die (" cannot execute create query");
}

the following code repeats saying ERORR : cannot execute query.

if i delete the text IF NOT EXISTS al goes good.

I don't understand why.

Please help.



-- 
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] retrieval of NEXT, PREV records

2001-02-21 Thread Chris Book

you have to make sure you order by Rec_id all the time too.

-Original Message-
From: JJeffman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 4:39 PM
To: Adv. Systems Design; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] retrieval of NEXT, PREV records


"SELECT * FROM Table WHERE Rec_id  $recid LIMIT 1" always bring you the
next record no matter the Rec_id is.

HTH

Jayme.

-Mensagem Original-
De: Adv. Systems Design [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: tera-feira, 20 de fevereiro de 2001 11:41
Assunto: [PHP-DB] retrieval of NEXT, PREV records


 I have set up links to browse records one by one,
 using (ID+1) for NEXT and (ID-1) for PREV...the only
 problem is that if there is a hole in the ID sequence
 (as from DELETION), there is no record returned...How
 can I have it so that the 'holes' are paved over and
 not returned?

 TIA

 Luis

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35
 a year!  http://personal.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]




-- 
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] while loop driving me crazy

2001-02-21 Thread Miles Thompson

I've used a similar structure hundreds of times, but the following isn't 
working:

$result = mysql_query($sql, 
$db); 

if( !$result ) { echo "No result code in SQL send. br"; 
}
if( mysql_num_rows( $result ) = 1 
)
{ 

echo "Rows fetched: ", mysql_num_rows( $result ), 
"br";
while( $row = mysql_fetch_array( $result ) ) 
;
{ 

   //$password = $row[ password 
];
   //$first_name = $row[ first_name 
];
   //$last_name = $row[ last_name 
];
   //$email = $row[ email 
];

   echo "In the 
while!!br"; 

   echo $row[ password ] . "br" ;

   // there will be code here to build and send an email

} 

echo 
"hr"; 

echo "Mailing of passwords completed. 
brbr" 

echo "input type = \"submit\" name = \"action[]\" value= \" $Close \" 
onclick=\"window.close()\"/td";
} 


The sql statement show below has been tested interactively, it does return 
5 records and none of them are nulls.
--- begin sql ---
select first_name, last_name, password, email from subscriber where 
lpasswd_mailed = 0 and email != ''
--- end sql ---

Here's the output from the browser:
-- top of browser ---
Rows fetched: 5
In the while!!
horizontal rule 
Mailing of passwords completed.
CLOSE BUTTON
end of output --

I believe it should show, in addition to the record count..
   "In the while" 5 times, interspersed with password values.

What is the dumb obvious thing I'm missing?

Regards - Miles Thompson





-- 
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] while loop driving me crazy

2001-02-21 Thread Allsebrook_Richard/askr
 BDY.RTF

-- 
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] while loop driving me crazy

2001-02-21 Thread Chris Andrew

Remove the semi-colon after your while() statement.

 -Original Message-
 From: Miles Thompson [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2001 15:01
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] while loop driving me crazy
 
 
 I've used a similar structure hundreds of times, but the following isn't 
 working:
 
 $result = mysql_query($sql, 
 $db); 
 
 if( !$result ) { echo "No result code in SQL send. br"; 
 }
 if( mysql_num_rows( $result ) = 1 
 )
 { 
 
 echo "Rows fetched: ", mysql_num_rows( $result ), 
 "br";
 while( $row = mysql_fetch_array( $result ) ) 
 ;
 { 
 
//$password = $row[ password 
 ];
//$first_name = $row[ first_name 
 ];
//$last_name = $row[ last_name 
 ];
//$email = $row[ email 
 ];
 
echo "In the 
 while!!br"; 
 
echo $row[ password ] . "br" ;
 
// there will be code here to build and send an email
 
 } 
 
 echo 
 "hr"; 
 
 echo "Mailing of passwords completed. 
 brbr" 
 
 echo "input type = \"submit\" name = \"action[]\" value= \" 
 $Close \" 
 onclick=\"window.close()\"/td";
 } 
 
 
 The sql statement show below has been tested interactively, it 
 does return 
 5 records and none of them are nulls.
 --- begin sql ---
 select first_name, last_name, password, email from subscriber where 
 lpasswd_mailed = 0 and email != ''
 --- end sql ---
 
 Here's the output from the browser:
 -- top of browser ---
 Rows fetched: 5
 In the while!!
 horizontal rule 
 Mailing of passwords completed.
 CLOSE BUTTON
 end of output --
 
 I believe it should show, in addition to the record count..
"In the while" 5 times, interspersed with password values.
 
 What is the dumb obvious thing I'm missing?
 
 Regards - Miles Thompson
 
 
 
 
 
 -- 
 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] Data input

2001-02-21 Thread Matthew Cothier

I have set up a database so that users can submit news to my website. The 
only problem is they input their news article into the database through a 
form but it comes out as a continuous string of text.

(a) shows what it looks like now, and (b) shows how its supposed to look. 
How can they input the data into the database as they typ eit in without 
them having to add html .br. tags?

(a) this is line one this is line two this is line three

(b) this is line one

this is line two

this is line three
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]




[PHP-DB] php/mysql

2001-02-21 Thread Ramiro Radjiman

i have this code.

function create_mysqltable($db_name,$table_name){
mysql_select_db($db_name);
 $sql_query = "CREATE TABLE IF NOT EXISTS $table_name "
 . "(  id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, "
 . "   soort char(20), "
 . "   aantal varchar(20) DEFAULT '0', "
 . "   str_men varchar(20) DEFAULT '0', "
 . "   recht varchar(20) DEFAULT '0', "
 . "   rechtverstek varchar(20) DEFAULT '0', "
 . "   verstekgelijk varchar(20) DEFAULT '0', "
 . "   verstekongelijk varchar(20) DEFAULT '0', "
 . "   PRIMARY KEY (id), "
 . "   UNIQUE id (id))";
 mysql_query($sql_query)
  or die (" cannot execute create query");
}

the following code repeats saying ERORR : cannot execute query.

if i delete the text IF NOT EXISTS al goes good.

I don't understand why.

Please help.



-- 
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] while loop driving me crazy

2001-02-21 Thread Miles Thompson

Richard,

What can one say? Too late? Too long looking at it? Reading too quickly?
or in the immortal wordsof Charlie Brow " AUUGH!"

Thanks a  million and love your signature.

Miles Thompson


At 03:30 PM 2/21/01 +, [EMAIL PROTECTED] wrote:
 while( $row = mysql_fetch_array( $result ) ) ;

- Drop the semi-colon at the end ;-)

   _

~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
http://www.easysoft.com http://www.easysoft.com  -
http://www.cinema.com http://www.cinema.com
"A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila."

   _


-- 
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] nl2br()

2001-02-21 Thread Matthew Cothier

Where exactly do I need to insert this?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]




[PHP-DB] authentication in a browsing directory

2001-02-21 Thread Helmut Tessarek

Hi,

I've got some directories that should be accessed via the browser. This
works fine.
To secure a directory I always used the directives in the .htaccess
file. This works aswell.
Now I wrote a little PHP script that looks in a table of a database if
the user is allowed to access the page or not.
So far, so good.
The problem is that (since index.php is automatically called regarding
to the DirectoryIndex directive) the directory
is never listed.
I'm pretty sure that there is a way how to manage this, but
unfortunately I don't get it.
Is there a header request that lists the directory without looking for
the index.html and index.php?

Below is the code of my index.php (DirectoryIndex index.html index.php):

?
function authenticate() {
   $realm = "Test Realm";
   Header("WWW-authenticate: basic realm=\"$realm\"");
   Header("HTTP/1.0 401 Unauthorized");
   // Header("status: 401 Unauthorized"); // This had to be used for
earlier Apache versions
   ?
   You need a valid user id.
   ?
   exit;
}

if( !isset( $PHP_AUTH_USER )) {
   authenticate();
} else {
   $conn = odbc_connect("db", "user", "pwd");
   if (!$conn){
  ?
  H2Error connecting to database!/H2
  ?
   } else {
  $id = strtolower( $PHP_AUTH_USER );
  $query = "select * from table where id='$id' and
pwd='$PHP_AUTH_PW'";
  $res = odbc_exec( $conn, $query );

  if( !odbc_num_rows( $res ))
 authenticate();

   }
}

echo "Success"; // Here should be a statement that would list the
directory as it would be shown without the index.php file

?

--

--- Helmut NoCarrier Tessarek --- [EMAIL PROTECTED] ---

  IBM Certified Solution Expert
 Microsoft Certified Systems Engineer  (MCP, MCP+I, MCSE)
 Karmarschgasse 53/1/3/11, A-1100 Vienna, Austria

- http://www.evermeet.cx -



-- 
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] retrieval of NEXT, PREV records

2001-02-21 Thread JJeffman

As far as I know, if you do not set any special order, the table is ordered
by primary key, isn't it ?

Jayme.


-Mensagem Original-
De: Chris Book [EMAIL PROTECTED]
Para: JJeffman [EMAIL PROTECTED]; Adv. Systems Design
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Enviada em: quarta-feira, 21 de fevereiro de 2001 11:16
Assunto: RE: [PHP-DB] retrieval of NEXT, PREV records


 you have to make sure you order by Rec_id all the time too.

 -Original Message-
 From: JJeffman [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 20, 2001 4:39 PM
 To: Adv. Systems Design; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] retrieval of NEXT, PREV records


 "SELECT * FROM Table WHERE Rec_id  $recid LIMIT 1" always bring you the
 next record no matter the Rec_id is.

 HTH

 Jayme.

 -Mensagem Original-
 De: Adv. Systems Design [EMAIL PROTECTED]
 Para: [EMAIL PROTECTED]
 Enviada em: tera-feira, 20 de fevereiro de 2001 11:41
 Assunto: [PHP-DB] retrieval of NEXT, PREV records


  I have set up links to browse records one by one,
  using (ID+1) for NEXT and (ID-1) for PREV...the only
  problem is that if there is a hole in the ID sequence
  (as from DELETION), there is no record returned...How
  can I have it so that the 'holes' are paved over and
  not returned?
 
  TIA
 
  Luis
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail - only $35
  a year!  http://personal.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]
 




-- 
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] authentication in a browsing directory

2001-02-21 Thread Helmut Tessarek

Hi,

I've got some directories that should be accessed via the browser. This
works fine.
To secure a directory I always used the directives in the .htaccess
file. This works aswell.
Now I wrote a little PHP script that looks in a table of a database if
the user is allowed to access the page or not.
So far, so good.
The problem is that (since index.php is automatically called regarding
to the DirectoryIndex directive) the directory
is never listed.
I'm pretty sure that there is a way how to manage this, but
unfortunately I don't get it.
Is there a header request that lists the directory without looking for
the index.html and index.php?

Below is the code of my index.php (DirectoryIndex index.html index.php):

?
function authenticate() {
   $realm = "Test Realm";
   Header("WWW-authenticate: basic realm=\"$realm\"");
   Header("HTTP/1.0 401 Unauthorized");
   // Header("status: 401 Unauthorized"); // This had to be used for
earlier Apache versions
   ?
   You need a valid user id.
   ?
   exit;
}

if( !isset( $PHP_AUTH_USER )) {
   authenticate();
} else {
   $conn = odbc_connect("db", "user", "pwd");
   if (!$conn){
  ?
  H2Error connecting to database!/H2
  ?
   } else {
  $id = strtolower( $PHP_AUTH_USER );
  $query = "select * from table where id='$id' and
pwd='$PHP_AUTH_PW'";
  $res = odbc_exec( $conn, $query );

  if( !odbc_num_rows( $res ))
 authenticate();

   }
}

echo "Success"; // Here should be a statement that would list the
directory as it would be shown without the index.php file

?

--

--- Helmut NoCarrier Tessarek --- [EMAIL PROTECTED] ---

  IBM Certified Solution Expert
 Microsoft Certified Systems Engineer  (MCP, MCP+I, MCSE)
 Karmarschgasse 53/1/3/11, A-1100 Vienna, Austria

- http://www.evermeet.cx -



-- 
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] MySQL database transfer

2001-02-21 Thread Sridhar Ranganathan

Hi

I have mysql on linux and windows on the same machine. How do i transfer 
data between them??

Thanks in advance
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] retrieval of NEXT, PREV records

2001-02-21 Thread Sweep the Net

It would only be ordered that way if you had not
deleted any records and added new ones.  IF there
are ones deleted, the next ones frill in the space.

Bob



At 05:00 PM 2/21/01 -0500, you wrote:
Perhaps it is ordered that way, perhaps not, but live by the creed "Expect
nothing and you will never be disappointed."

Go ahead and specify the order you demand.


  -Original Message-
  From: JJeffman [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 21, 2001 4:40 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] retrieval of NEXT, PREV records
 
 
  As far as I know, if you do not set any special order, the table
  is ordered
  by primary key, isn't it ?
 
  Jayme.
 
 


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

2001-02-21 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] ("Matthew Cothier") wrote:

 How can they input the data into the database as they typ eit in without 
 them having to add html .br. tags?

nl2br()

-- 
CC

-- 
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] retrieval of NEXT, PREV records

2001-02-21 Thread JJeffman

I'm sorry I haven't noticed that. I couldn't believe, then I tried to create
and make some delete-insert operations and the primary key order has gone
away. Thanks a lot. One more lesson I learned.

Jayme.


-Mensagem Original-
De: Sweep the Net [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 21 de fevereiro de 2001 19:06
Assunto: RE: [PHP-DB] retrieval of NEXT, PREV records


 It would only be ordered that way if you had not
 deleted any records and added new ones.  IF there
 are ones deleted, the next ones frill in the space.

 Bob



 At 05:00 PM 2/21/01 -0500, you wrote:
 Perhaps it is ordered that way, perhaps not, but live by the creed
"Expect
 nothing and you will never be disappointed."
 
 Go ahead and specify the order you demand.
 
 
   -Original Message-
   From: JJeffman [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 21, 2001 4:40 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] retrieval of NEXT, PREV records
  
  
   As far as I know, if you do not set any special order, the table
   is ordered
   by primary key, isn't it ?
  
   Jayme.
  
  


 --
 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] cancel 3A943D4B.8B7974E9@evermeet.cx

2001-02-21 Thread Helmut Tessarek

This message was cancelled from within Mozilla.

-- 
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: Is there a PHP equivalent of DATE_FORMAT ?

2001-02-21 Thread Phil Daintree

Timothy Wright wrote:

... so echo date("Y-n-j") would give me the output in the right format, but
I need to convert the input to a valid timestamp first.

You can use parse out the year, month and day and then use the mktime function - the 
dates
I use are dd/mm/yy format:

/*Make an array of the string TransDate  using the / character as the seperator*/
$Date_array = explode("/", $TransDate);

/*If the year is before 60 then assume we are in 2000 - look out in 2061 ! */
 If ((int)$Date_array[2] 60) {
  $Date_array[2] = "20". $Date_array[2];
 } elseif ((int)$Date_array[2] 59 AND (int)$Date_array[2] 100) {
  $Date_array[2] = "19". $Date_array[2];
 }

/*Make a unix time stamp out of the array elements */
 $TransDate = mktime(0,0,0,$Date_array[1],$Date_array[0],$Date_array[2]);

Phil




-- 
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] MySQL database transfer

2001-02-21 Thread Andrew Apold

At 03:24 AM 2/22/01 -, Sridhar Ranganathan wrote:
Hi

I have mysql on linux and windows on the same machine. How do i transfer 
data between them??

use mysql dump to create a script, .sql file, and execute it on the other one.


=
"To dwell within Samsara, however, is to
 be subject to the works of those mighty
 among dreamers."

 - Mahasamatman, in Zelazny's "Lord of Light"

Andrew Apold


-- 
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] Problem with IB's LEN

2001-02-21 Thread Jarek Zgoda

I have in my Interbase6 table a column defined as NUMERIC(18,2), but PHP
shows it as integer value. During tests i discovered, that largest precision
allowed for large exact numeric is 9 (NUMERIC(9,2)). Is there any switch
that allows use larger precisions?

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] Can PHP read View in stead of Table?

2001-02-21 Thread WC Ip



Dear all,

I have install PHP on Linux and use Openlink ODBC Driver to link to MS SQL
server on Windows NT. Just now I can read data from Table on SQL server.
However, when I make View on the same database, I can't use PHP to extract data
from this View. When I do query on the View, error message shown:

Warning: SQL error: [OpenLink][ODBC][Driver]No key columns found for table
referenced
by keyset driven cursor., SQL state IM909 in SQLExecDirect in
/usr/local/apache_1.3.12/htdocs/internet.php on line 42

The possible problem may due to primary key of table. As testing, I found the
table
with primary i can access easily. However, when i remove primary key from the
same
table, error has shown and cannot show data.

May I solve this problem or this is the bugs of openlink ODBC driver?

Thanks for your help!!!

Peter



-- 
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] number formatting bug?

2001-02-21 Thread Lennin Arriola

I was thinking again , if you are for instance using winxxx
check in start settings/control panel/regional settings decimal after
point...
this might be affecting,  there must be something similar on unix.

Check out in the help "set_locale" that should do the trick.

Lennin Arriola
[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] Oracle - PHP

2001-02-21 Thread Hise, Jeremy

Hi:

I have PHP with mySQL compiled in. We are about to attempt to connect to
Oracle. Of course we have to rebuild PHP with the added Oracle support, but
I was just wondering if anyone has done this and if so, could you offer any
noteworthies or comments about using PHP with Oracle.

Thanks!

-
Jeremy D. Hise
Consulting Direct, Inc.

(212)736-5870 x228


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