Re: [PHP-DB] mysql newbie

2001-05-10 Thread Russ Michell

how to set mysql to ask password to any user who try to enter ?

If you are using a GUI like phpMyAdmin to administer the MySQL 
database, you can use it to prompt for a username and password such as 
would occur with a .htaccess/.htpasswd file combination.

If you're on the command line - in Linux you can type mysql -p 
anywhere at the shell prompt (if you installed it to run in the 
background as a 'deamon') and it'll prompt you to type a username and a 
password.

Take care to remember these as it's v.hard to recover when you loose 
these (I know 'cos I did it!)

Good luck!
Russ

On Thu, 10 May 2001 11:45:32 +0700 andrie [EMAIL PROTECTED] 
wrote:

 Hello php-db,
 
   a allready install mysql on apache and idont create any user yet
   one question from me, when i enter mysql, i can enter it without
   being asking any password(i'm not root). how to set mysql to ask
   password to any user who try  to enter ?
 
 -- 
 Best regards,
  andrie  mailto:[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]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam
  t: +44 (0)1223 363271 x 2331

  www.theruss.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] True and Flase in mysql !!

2001-05-10 Thread hassan el forkani

you could also use a char(0) field in which case you can only have two possible 
records: NULL and ' ' (empty string)
regards



09/05/01 22:42:04, Zak Greant [EMAIL PROTECTED] wrote:

Use an enum field.

--zak


- Original Message -
From: DesClub.com [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 2:43 AM
Subject: [PHP-DB] True and Flase in mysql !!


hi all ..
What is the best way to create True\Flase field in mysql ??


-
http://deslcub.com/phpLinkat/
DesClub.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] Autoincrement Question

2001-05-10 Thread Jeff Oien

If I have a database that has three records and I delete the entire
third record, when another record is then added will the auto_increment
number be 3 or 4? Thanks.
Jeff Oien

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

2001-05-10 Thread Angie Tollerson

I will be 3 Jeff :)


 Jeff Oien [EMAIL PROTECTED] 05/10/01 01:13PM 
If I have a database that has three records and I delete the entire
third record, when another record is then added will the auto_increment
number be 3 or 4? Thanks.
Jeff Oien

-- 
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] exit code generation, php shell script/standalone

2001-05-10 Thread Dave

to tie in web based scripts and database updates with some server side
authentication issues, we need to have a PHP script be called from
another program.  The program expects a return or exit value to be
transmitted back on completion or termination of the script.  0
indicating success and anything else indicating failure

PHP has exit() and die() which, all though you can place a variable or
string in
it, only prints it to the screen (or other output target) prior to
killing itself, and does not send an exit code as would a perl script

is there any way to generate a exit code on the completion of a php
script that will be  interpreted by the program or CGI calling the
script, even if it is code to wrap the PHP script in yet another perl
shell.  We need to send some variables back from the PHP script to the
terminal as open text (just printed to the screen), but the program is
specifically waiting for the exit code.

really want to avoide writing a perl/dbi script to carry out this
function.

Appreciate any insight

Dave


-- 
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] exit code generation, php shell script/standalone

2001-05-10 Thread Dave VanAuken

did try it,  no go.  Tried a number of permutations, but it doesn't
seem to want to actually return the exit code...  just prints it to
the screen (in terminal mode) which is pretty and all, but not what I
need :)

just wondering is a solution exists and i just can't see the forest
for the trees.

Dave

-Original Message-
From: Miles Thompsonclipped

Dave,

You can return a value from a function ...

function dosomething( para1, para2 )
{
code here
which depending on success or failure sets $reflag to 0 or 1
return $retflag;
}

So now the question is Can we return a value from a
script? Hell, I don't
know, why not just try it?
My gut feeling is that it would go to the browser, not to
the calling program.
Interesting question.

Cheers - Miles

http:/www.php.net
At 02:26 PM 5/10/01 -0400, Dave wrote:
to tie in web based scripts and database updates with some
server side
authentication issues, we need to have a PHP script be called from
another program.  The program expects a return or exit value to be
transmitted back on completion or termination of the script.  0
indicating success and anything else indicating failure

PHP has exit() and die() which, all though you can place a
variable or
string in
it, only prints it to the screen (or other output target) prior to
killing itself, and does not send an exit code as would a
perl script

is there any way to generate a exit code on the completion of a php
script that will be  interpreted by the program or CGI calling the
script, even if it is code to wrap the PHP script in yet
another perl
shell.  We need to send some variables back from the PHP
script to the
terminal as open text (just printed to the screen), but the
program is
specifically waiting for the exit code.

really want to avoide writing a perl/dbi script to carry out this
function.

Appreciate any insight

Dave
clipped


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

2001-05-10 Thread tcuhost

does this make sense?

assuming:

class myObject
{
$var1 = A;
$var2 = B;
}

http://blahblah.com/?passedClass=myObject

would passedClass also send with it being an oject both variables and the
rest of the class defined?

-- 
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] Creating/reading [TAGS]

2001-05-10 Thread Paul Burney

on 5/10/01 3:07 PM, David Balatero ([EMAIL PROTECTED]) wrote:

 I am making a content backend for my site, and I need pointers or ideas
 on how to implement a formatting system like the one seen in UBB or
 phpBB, that uses bracket tags to format content submissions. For
 example:
 
 [b]bold[/b]
 etc.

Since phpBB is open source, you could probably look through the source code
and find it.  I would guess some kind of preg_replace loop.

http://www.phpbb.com/

Paul

++
Paul Burney
Webmaster and Open Source Developer
Educational Technology Unit
Graduate School of Education and Information Studies
University of California, Los Angeles
(310) 825-8365
[EMAIL PROTECTED]
http://www.gseis.ucla.edu/
++


-- 
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] exit code generation, php shell script/standalone

2001-05-10 Thread Dave VanAuken

this particular instance of call is from a radius server (perl or C),
so it is not interacting with the web server at all, no browsers...  a
shell script for all intents and purposes, which parses the db for the
required aiuthentication info and processes the request accordingly
(along with other tasks).

perl scripts for example, can exit back to the calling program with a
return code or value.  for example, the following when called by
another program will return a 0

#!/usr/bin/perl
$ret=0;
exit $ret;

if conditions are not met, you can pass a failure notice to the
calling program depending on the value returned.

would like to do the same with the php script, but it returns the
variable prior to exiting (ie printing it to the screen) rather than
passing it back

Dave


-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 4:16 PM
To: Dave VanAuken
Subject: RE: [PHP-DB] exit code generation, php shell
script/standalone


Dave,

I'm just free associating here, so these suggestions may be
worthless:

If you are calling the PHP script as a CGI program does it
return different
values if you cause it to die or exit vs. successful
completion? I'm
not talking about the die message.

If you are calling it from within the web browser (sic.) use
phpinfo() to
see if any http_vars would serve. (Or if IIS, whatever the
equivalents are.)

Maybe you could fake this with a header() call.

Miles


At 03:06 PM 5/10/01 -0400, you wrote:
did try it,  no go.  Tried a number of permutations, but it doesn't
seem to want to actually return the exit code...  just prints it to
the screen (in terminal mode) which is pretty and all, but
not what I
need :)

just wondering is a solution exists and i just can't see the forest
for the trees.

Dave

 -Original Message-
 From: Miles Thompsonclipped
 
 Dave,
 
 You can return a value from a function ...
 
 function dosomething( para1, para2 )
 {
 code here
 which depending on success or failure sets $reflag to 0 or 1
 return $retflag;
 }
 
 So now the question is Can we return a value from a
 script? Hell, I don't
 know, why not just try it?
 My gut feeling is that it would go to the browser, not to
 the calling program.
 Interesting question.
 
 Cheers - Miles
 
 http:/www.php.net
 At 02:26 PM 5/10/01 -0400, Dave wrote:
 to tie in web based scripts and database updates with some
 server side
 authentication issues, we need to have a PHP script be
called from
 another program.  The program expects a return or exit
value to be
 transmitted back on completion or termination of the script.  0
 indicating success and anything else indicating failure
 
 PHP has exit() and die() which, all though you can place a
 variable or
 string in
 it, only prints it to the screen (or other output
target) prior to
 killing itself, and does not send an exit code as would a
 perl script
 
 is there any way to generate a exit code on the
completion of a php
 script that will be  interpreted by the program or CGI
calling the
 script, even if it is code to wrap the PHP script in yet
 another perl
 shell.  We need to send some variables back from the PHP
 script to the
 terminal as open text (just printed to the screen), but the
 program is
 specifically waiting for the exit code.
 
 really want to avoide writing a perl/dbi script to carry out this
 function.
 
 Appreciate any insight
 
 Dave
clipped


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

2001-05-10 Thread Nickolas Heyde

If I were U I would convert it to UNIX date first subtract and then restore
to normal format  what do U think !?!?!

Mikail [EMAIL PROTECTED] escreveu na mensagem
008c01c0d2f2$2e0df880$bb02a8c0@maz">news:008c01c0d2f2$2e0df880$bb02a8c0@maz...
 hi,
 I'm a newbie from Italy
 I use php with mysql and I need to find a way to visualize the difference
 between two dates.
 For ex in a row I have column [A] and column [B]
 [A] 2001-05-02 10:00:00
 [B] 2001-05-02 10:01:30
 If I use
 SELECT TIME_FORMAT([B]-[A], '%H:%i:%s') result is 00:01:30
 But it's the same if I use SELECT TIME_FORMAT([A]-[B], '%H:%i:%s')
 why? I need a - (minus)!
 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]




[PHP-DB] just testing

2001-05-10 Thread Nickolas Heyde

hi



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

2001-05-10 Thread Joe Brown

Nope.

something like this may get you where you want to go though

  include(myObjectClassDeclaration);
  $myInstance=new myObject;
  echo
http://blahblah.com/?passedClass=.urlencode(serialize($myInstance));

Then in subsequent pages this should work:

  include(myObjectClassDeclaration);
  $myInstance=unserialize($passedClass);


[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 does this make sense?

 assuming:

 class myObject
 {
 $var1 = A;
 $var2 = B;
 }

 http://blahblah.com/?passedClass=myObject

 would passedClass also send with it being an oject both variables and the
 rest of the class defined?

 --
 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] connection to Oracle 7.3 with ora_logon()

2001-05-10 Thread Sheeta

Dear,

Sorry, I also have the same probelm... On my php.ini, I can't find the
php_oci8.dll and php_oracle.dll... where I can find it??
Please help?!

Sheeta


Philippe Saladin [EMAIL PROTECTED] wrote in message
9darfc$fvs$[EMAIL PROTECTED]">news:9darfc$fvs$[EMAIL PROTECTED]...
 Thanks to Randall Barber, I've just to uncomment php_oci8.dll or
 php_oracle.dll in the php.ini file. It works now. I hadn't read enough the
 docs!

 Regards,
 Philippe



 --
 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: Date formats from Postgres

2001-05-10 Thread Micah Woods

Sean, here's a php function that returns a formatted date. This currently
returns a US formatted date but you can easily change it to Australian.

// convert timestamp to date for display.
function displayDate($timeStamp, $separator=/, $leading=f) {
$arr = explode(-, $timeStamp);
if ($leading == t) {
$month = $arr[1];
$day = $arr[2];
$year = $arr[0];
} else {
$month = (integer) $arr[1];
$day = (integer) $arr[2];
$year = (integer) $arr[0];
}
return $month$separator$day$separator$year;
}

 I am reading a data datatype from a PostgreSQL database,
 
 the format sohwing  is 2001-01-05 for the 1st of May this year,
 
 I need this date in Australian format i.e. 01/05/2001,
 
 I tried using the string date (string format [, int timestamp])
 
 but with no success.I am not sure how to convert the database variable into
 a timestamp.
 
 any suggestions ?
 
 Sean Weissensee

Micah
--
Micah Woods
Woods/IT LLC
2214 Waite Ave.
Kalamazoo, MI 49008

v: 616 349-1175
f: 877 349-4929 (toll free)
e: [EMAIL PROTECTED]
w: http://www.woods-it.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]