[PHP-DB] Re: how to call a stored procedure in SQL Server 2000

2002-12-27 Thread Radovan Radic
I have sp like this in MSSQL
CREATE procedure dsp_ani_usage_period   @from_date datetime, @to_date
datetime, @max_usage money
which does join select from some tables using these params for where

And i execute it from PHP

if(!isset($date_from))
{
  $date_from=date(m/d/Y,strtotime(-1 month));
  $date_to=date(m/d/Y);
}
if (!isset($amount))
  $amount=20;

$sql=exec dsp_ani_usage_period '$date_from','$date_to',$amount;
$sql_result=mssql_query($sql);

HTH,
Radovan

Ha Duy Thien [EMAIL PROTECTED] wrote in message
008d01c2ad60$d1caa6e0$311f483d@thien">news:008d01c2ad60$d1caa6e0$311f483d@thien...
Hi gurus,

I am new user to PHP.

Does anyone here work with SQL server with PHP, please show me some codes
about how to call a stored procedure in a SQL Server Database.

how to add paramaters also

Thanks a lot

Thien



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: how to call a stored procedure in SQL Server 2000

2002-12-27 Thread thien

Thanks you Radovan and Frank very much

I highly appreciate your answer.

It helps me to solve my problem quickly.

 thanks both of you agian

Radovan Radic [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have sp like this in MSSQL
 CREATE procedure dsp_ani_usage_period   @from_date datetime, @to_date
 datetime, @max_usage money
 which does join select from some tables using these params for where

 And i execute it from PHP

 if(!isset($date_from))
 {
   $date_from=date(m/d/Y,strtotime(-1 month));
   $date_to=date(m/d/Y);
 }
 if (!isset($amount))
   $amount=20;

 $sql=exec dsp_ani_usage_period '$date_from','$date_to',$amount;
 $sql_result=mssql_query($sql);

 HTH,
 Radovan

 Ha Duy Thien [EMAIL PROTECTED] wrote in message
 008d01c2ad60$d1caa6e0$311f483d@thien">news:008d01c2ad60$d1caa6e0$311f483d@thien...
 Hi gurus,

 I am new user to PHP.

 Does anyone here work with SQL server with PHP, please show me some codes
 about how to call a stored procedure in a SQL Server Database.

 how to add paramaters also

 Thanks a lot

 Thien





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Newbie q: problem with mysql_connect() on hosted service

2002-12-27 Thread Baumgartner Jeffrey
Sorry to bother you experts with a simple question (well, two actually).

I'm new to PHP and mysql. I'm using a hosted service (so I don't have access
to configuration files, server, etc). Recently, the server crashed. Since
resurrecting, all files attempting to connect to MySQL using 

$dbcnx = mysql_connect(localhost, [user], [password);

result in an error like:

Fatal error: Call to undefined function: mysql_connect() in
/home/.sites/22/site13/web/werks/formtest2.php on line 8

Prior to the crash, there was no problem.

After a string of questions to support, they finally admitted they don't
know PHP well enough to help me (!?!). However, they did install phpMyAdmin
- which seems to work okay. So, I'm not sure if I am doing something
fundamentally stupid or if the web host (Easyhost) has not configured things
correctly. Any suggestions will be most welcome.

On a related issue, I am completely fed up with Easyhost and am looking for
another web host. They should obviously be able to provide PHP + MySQL
together with decent support (very important). Ideally, they should provide
scalable service (from shared hosting to dedicated and be EU located (but
this isn't critical). They must be willing to host adult content (soft-core
erotica and adult humour). Any recommendations (on or off-list will be much
appreciated).

A million thanks,

Jeffrey Baumgartner


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Newbie q: problem with mysql_connect() on hosted service

2002-12-27 Thread Rick Widmer
At 10:45 AM 12/27/02 +0100, Baumgartner Jeffrey wrote:


Fatal error: Call to undefined function: mysql_connect() in
/home/.sites/22/site13/web/werks/formtest2.php on line 8


This means that MySQL is not enabled within PHP.  There is nothing you can 
do about it.  The hosting company needs to enable access to MySQL, probably 
by re-compiling PHP and Apache.  The exact fix depends on operating system, 
web server, and how PHP is compiled.

Rick


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] A newbie in deep need for help

2002-12-27 Thread Ehab El Maraghy
Hi everybody
I have installed php4 and mysql on IIs winxp 
I am trying to retrieve a password and print it using a query which is written as 
followos

$query2 = select passwd from user where username = '$username';
$result = mysql_result($query2);
echo centerBOld Password was $result /B/center;

am I using mysql_result right or is there another function to print this password 
taking in consideration that it just prints Old Password was and that's it




[PHP-DB] a newbie in deep need for help

2002-12-27 Thread Ehab El Maraghy
Hi everybody
I have installed php4 and mysql on IIs winxp
I am trying to retrieve a password and print it using a query which is
written as followos

$query2 = select passwd from user where username = '$username';
$result = mysql_result($query2);
echo centerBOld Password was $result /B/center;

am I using mysql_result right or is there another function to print this
password taking in consideration that it just prints Old Password was and
that's it




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Nope. Use this statement:

$result = mysql_query($query2);

The mysql_query() function actually performs the query to the db for you and
returns a resource with your result set contained within.

The mysql_result() function extracts the contents of a given cell from your
result set; it does not actually execute the query to the db. Essentially
you use mysql_result() to operate on a result set. Other things you can use
on your result set include, but are not limited to: mysql_fetch_array(),
mysql_fetch_row() and mysql_fetch_object, but again, they are operating on
the result set retrieved by the mysql_query() function.

Here's a good overview of the above functions:
http://www.php.net/manual/en/function.mysql-result.php

Hope this helps

-Original Message-
From: Ehab El Maraghy [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 4:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] A newbie in deep need for help


Hi everybody
I have installed php4 and mysql on IIs winxp
I am trying to retrieve a password and print it using a query which is
written as followos

$query2 = select passwd from user where username = '$username';
$result = mysql_result($query2);
echo centerBOld Password was $result /B/center;

am I using mysql_result right or is there another function to print this
password taking in consideration that it just prints Old Password was and
that's it



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] What is a wrong parameter count error mean?

2002-12-27 Thread Jody Cleveland
Hello all,

I'm trying to get a php application working that uses ldap. Anyway, when I
try to login, I get this error message:

Warning: Wrong parameter count for ldap_error() in
/var/www/html/mail/mail132/plugins/webcalendar/includes/user-ldap.php on
line 101

What exactly does that mean?

-Jody Cleveland

Winnefox Library System
Computer Support Specialist
[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] What is a wrong parameter count error mean?

2002-12-27 Thread Jeffrey_N_Dyke

the function takes a certian number of required arguments(or parameters)
and you're not passing enough.  For this funtion it only takes one, which
is the ldap resource link identifier.  which was probably set in $var =
ldap_connect(ldap_server).  here the resource link identifer would be
$var.

HTH
Jeff


   
  
Jody Cleveland 
  
[EMAIL PROTECTED]   To: Php-Db (E-mail) 
[EMAIL PROTECTED]   
nefox.orgcc:  
  
  Subject: [PHP-DB] What is a wrong 
parameter count error mean?
12/27/2002 11:52 AM
  
   
  
   
  




Hello all,

I'm trying to get a php application working that uses ldap. Anyway, when I
try to login, I get this error message:

Warning: Wrong parameter count for ldap_error() in
/var/www/html/mail/mail132/plugins/webcalendar/includes/user-ldap.php on
line 101

What exactly does that mean?

-Jody Cleveland

Winnefox Library System
Computer Support Specialist
[EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] What is a wrong parameter count error mean?

2002-12-27 Thread Rich Hutchins
Usually it means that you're not passing the expected number of arguments to a 
function. For example, the substr() function takes a minimum of two, maximum of three 
parameters: the string to search, the start position and the length of the substring 
to return. To correctly use the function, you must use the following statement:

substr(my string, 3); which will return string OR
substr(my string, 0, 2); which will return my

If you only say:
substr(my string) PHP should tell you that you don't have enough parameters to 
properly use this function, i.e. the function does not know in what position it should 
start returning the substring.

The use of the substr() function in my explanation is not the most important piece of 
information here. In fact, it was only used to illustrate a point. What is relevant to 
your question is somewhere on line 101 of your code, you are most likely making the 
mistake of not providing the proper number of arguments to the ldap_error() function.

For info on the ldap_error function (which only requires one parameter), see:
http://www.php.net/manual/en/function.ldap-error.php

For more info on the substr() function, see 
http://www.php.net/manual/en/function.substr.php if you're interested.

Hope this helps. 

-Original Message-
From: Jody Cleveland [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 11:53 AM
To: Php-Db (E-mail)
Subject: [PHP-DB] What is a wrong parameter count error mean?


Hello all,

I'm trying to get a php application working that uses ldap. Anyway, when I
try to login, I get this error message:

Warning: Wrong parameter count for ldap_error() in
/var/www/html/mail/mail132/plugins/webcalendar/includes/user-ldap.php on
line 101

What exactly does that mean?

-Jody Cleveland

Winnefox Library System
Computer Support Specialist
[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Ehab El Maraghy
Rich
thanx for answering
I did what you said yesterday before using mysql_resut it returns   resource
id#3 didn't know what is it and how can i transform it it the data inside
the cell
i corrected the situation and i waited to give me res.id#3   but it doesn't
write anythingany suggestions  ? from my part i will revise the code
once again
waiting for your reply   thanx



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Help with FTP

2002-12-27 Thread Adam Williams
use system() to run /bin/df

depending on the OS you might need to add a flag to it like -h (linux) or
-k (solaris).

www.php.net/system

Adam

On Fri, 27 Dec 2002, Dankshit wrote:

 Is there a way to see how much space is left in a ftp server?

 thanks in advance!



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] a newbie in deep need for help

2002-12-27 Thread janet
In a message dated 12/27/02 8:26:10 AM Pacific Standard
Time, [EMAIL PROTECTED] writes:

 I am trying to retrieve a password and print it using
a query which is
  written as followos
  
  $query2 = select passwd from user where username =
'$username';
  $result = mysql_result($query2);
  echo centerOld Password was $result /center;
  
  am I using mysql_result right or is there another
function to print this
  password taking in consideration that it just prints
Old Password was and

Actually, it would go like this:

$query2 = select passwd from user where username =
'$username';
$result = mysql_query($query2);
$row = mysql_fetch_array($result);
extract($row);
echo centerOld Password was $passwd /center;

There are other ways. And shorter ones for this
particular task. But this is kind of a general purpose
set of statements that will usually do what you need. 

The mysql_query function sends the SQL query to the
database and puts the data returned into a temporary
table. mysql_fetch_array gets a row of data from the
temporary table and puts it into an array that you can
then process. The extract function creates separate
variables from the array. 

If you are getting more than one row from the database,
you can use the extract statement in a loop and process
each row.

Janet


Janet Valade
Author, PHP  MySQL for Dummies

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Yes, first you use:

$result = mysql_result($query2);

That will return something like resourceID #3. That's right. What you need
to do now is to use a function to access the resource. For example, if you
have a table named User with the following columns:
ID
username
passwd

and you want to perform a query that just returns the password, your code
would look like something like this:

$query2 = select passwd from user where username = '$username';//query
$result = mysql_query($query2);//perform the query and return result set
$thisPass = mysql_result($result);//return one column (passwd) from result
set
echop.$thisPass./p; //this line would just echo out the variable
$thisPass to the browser to show you what it contains.

Try that code and see if it works for you. If not, respond and paste all of
the code you're working with and I'll see if I can find what's going wrong.

Rich

-Original Message-
From: Ehab El Maraghy [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] A newbie in deep need for help


Rich
thanx for answering
I did what you said yesterday before using mysql_resut it returns   resource
id#3 didn't know what is it and how can i transform it it the data inside
the cell
i corrected the situation and i waited to give me res.id#3   but it doesn't
write anythingany suggestions  ? from my part i will revise the code
once again
waiting for your reply   thanx



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Upload Images...

2002-12-27 Thread Doug Coning
Hi All,

I've got a question about creating an Update page.  I have an update page
that has a form with about 15 fields in it that update records in my MySQL
database.  One of the fields is an IMAGE field that stores an image name.  I
want to this PHP page to do several things:

1) edit and update the fields.
2) allow the user to upload new images to replace current images and then
update the image name in the image column.

Is this best served as 1 page or is it better to break this down into a page
to upload images and a separate page to edit the content?

Thank you.

Doug




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Ehab El Maraghy
man  i have tried everything   the sentece is always printed without the
variable
don't know what is happening



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Upload Images...

2002-12-27 Thread Boaz Yahav
I'm guessing it's better for the people that will use this page to have
it all in one page
but less convenient for you to develop it like that :)

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Doug Coning [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 27, 2002 9:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Upload Images...


Hi All,

I've got a question about creating an Update page.  I have an update
page that has a form with about 15 fields in it that update records in
my MySQL database.  One of the fields is an IMAGE field that stores an
image name.  I want to this PHP page to do several things:

1) edit and update the fields.
2) allow the user to upload new images to replace current images and
then
update the image name in the image column.

Is this best served as 1 page or is it better to break this down into a
page to upload images and a separate page to edit the content?

Thank you.

Doug




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] a newbie in deep need for help

2002-12-27 Thread John Coder
On Fri, 2002-12-27 at 04:19, Ehab El Maraghy wrote:
 Hi everybody
 I have installed php4 and mysql on IIs winxp
 I am trying to retrieve a password and print it using a query which is
 written as followos
 
 $query2 = select passwd from user where username = '$username';
 $result = mysql_result($query2);
 echo centerBOld Password was $result /B/center;
 
 am I using mysql_result right or is there another function to print this
 password taking in consideration that it just prints Old Password was and
 that's it
 
If I'm not mistaken mysql_result() takes 3 arguments. try:

$select = select passwd from user where username = '$username';
$query2 = mysql_query($select);
$result=mysql_result($query2,0,0);
//the zeroes being the position of row and column i.e. row0 and column 0
echo $result;

John


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Upload Images...

2002-12-27 Thread Doug Coning
Yes, but do you know where I can find a sample of merging the upload script
with the Update script?

Thanks!!!

Doug
- Original Message -
From: Boaz Yahav [EMAIL PROTECTED]
To: Doug Coning [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 27, 2002 1:09 PM
Subject: RE: [PHP-DB] Upload Images...


 I'm guessing it's better for the people that will use this page to have
 it all in one page
 but less convenient for you to develop it like that :)

 Sincerely

 berber

 Visit http://www.weberdev.com/ Today!!!
 To see where PHP might take you tomorrow.


 -Original Message-
 From: Doug Coning [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 9:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Upload Images...


 Hi All,

 I've got a question about creating an Update page.  I have an update
 page that has a form with about 15 fields in it that update records in
 my MySQL database.  One of the fields is an IMAGE field that stores an
 image name.  I want to this PHP page to do several things:

 1) edit and update the fields.
 2) allow the user to upload new images to replace current images and
 then
 update the image name in the image column.

 Is this best served as 1 page or is it better to break this down into a
 page to upload images and a separate page to edit the content?

 Thank you.

 Doug




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Upload Images...

2002-12-27 Thread Aaron Wolski
Write your own.

You'll spend more time trying to find something than it will take you to
create your own. Plus.. anything that you do find will need
modifications anyway so may as well write your own.

Define the scope/parameters
Write out the logic
Program the script

:)

Aaron

-Original Message-
From: Doug Coning [mailto:[EMAIL PROTECTED]] 
Sent: December 27, 2002 3:29 PM
To: Boaz Yahav; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Upload Images...

Yes, but do you know where I can find a sample of merging the upload
script
with the Update script?

Thanks!!!

Doug
- Original Message -
From: Boaz Yahav [EMAIL PROTECTED]
To: Doug Coning [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 27, 2002 1:09 PM
Subject: RE: [PHP-DB] Upload Images...


 I'm guessing it's better for the people that will use this page to
have
 it all in one page
 but less convenient for you to develop it like that :)

 Sincerely

 berber

 Visit http://www.weberdev.com/ Today!!!
 To see where PHP might take you tomorrow.


 -Original Message-
 From: Doug Coning [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 9:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Upload Images...


 Hi All,

 I've got a question about creating an Update page.  I have an update
 page that has a form with about 15 fields in it that update records in
 my MySQL database.  One of the fields is an IMAGE field that stores an
 image name.  I want to this PHP page to do several things:

 1) edit and update the fields.
 2) allow the user to upload new images to replace current images and
 then
 update the image name in the image column.

 Is this best served as 1 page or is it better to break this down into
a
 page to upload images and a separate page to edit the content?

 Thank you.

 Doug




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] a newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Aha! John, you're right. I remember stumbling over this the first time I
used it. Sorry for any confusion,  Ehab.

More info here:
http://www.php.net/manual/en/function.mysql-result.php

-Original Message-
From: John Coder [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 2:09 PM
To: Ehab El Maraghy
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] a newbie in deep need for help


On Fri, 2002-12-27 at 04:19, Ehab El Maraghy wrote:
 Hi everybody
 I have installed php4 and mysql on IIs winxp
 I am trying to retrieve a password and print it using a query which is
 written as followos

 $query2 = select passwd from user where username = '$username';
 $result = mysql_result($query2);
 echo centerBOld Password was $result /B/center;

 am I using mysql_result right or is there another function to print this
 password taking in consideration that it just prints Old Password was
and
 that's it

If I'm not mistaken mysql_result() takes 3 arguments. try:

$select = select passwd from user where username = '$username';
$query2 = mysql_query($select);
$result=mysql_result($query2,0,0);
//the zeroes being the position of row and column i.e. row0 and column 0
echo $result;

John


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] calendar system

2002-12-27 Thread Edward Peloke
Hello all,

I need to create a basic calendar page for my office where people can post
their days off.  All the data will be stored in the mysql db.  Does anyone
know of any good code I an use to get me started?  I have seen a lot online
of calendar systems but I just want something to start with, not a finished
product.

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Flow diagrams

2002-12-27 Thread Sridhar Moparthy
Hi Every one,

I have information about some processes in the database that tells different
process dependencies. I need to display that information as a process flow
diagram. Do you know how to prepare and display process flow diagrams
dynamically. Do you know anything like JPGraph or Java script or java applet
that can do this? If so Please help me.

I am using PHP 4.xx and IIS on Win NT platform. Please help me if you know

how to do.

Thank You,

Sridhar Moparthy






RE: [PHP-DB] Upload Images...

2002-12-27 Thread Boaz Yahav
Is there something you don't know how to do or are you just looking for
something ready made?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.




-Original Message-
From: Doug Coning [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 27, 2002 10:29 PM
To: Boaz Yahav; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Upload Images...


Yes, but do you know where I can find a sample of merging the upload
script with the Update script?

Thanks!!!

Doug
- Original Message -
From: Boaz Yahav [EMAIL PROTECTED]
To: Doug Coning [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 27, 2002 1:09 PM
Subject: RE: [PHP-DB] Upload Images...


 I'm guessing it's better for the people that will use this page to 
 have it all in one page but less convenient for you to develop it like

 that :)

 Sincerely

 berber

 Visit http://www.weberdev.com/ Today!!!
 To see where PHP might take you tomorrow.


 -Original Message-
 From: Doug Coning [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 9:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Upload Images...


 Hi All,

 I've got a question about creating an Update page.  I have an update 
 page that has a form with about 15 fields in it that update records in

 my MySQL database.  One of the fields is an IMAGE field that stores an

 image name.  I want to this PHP page to do several things:

 1) edit and update the fields.
 2) allow the user to upload new images to replace current images and 
 then
 update the image name in the image column.

 Is this best served as 1 page or is it better to break this down into 
 a page to upload images and a separate page to edit the content?

 Thank you.

 Doug




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] postgresql vs mysql

2002-12-27 Thread Boaz Yahav
This is why i was amazed to see this : http://www.mysql.com/eweek/index.html

-Original Message-
From: David Bryant [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 26, 2002 10:43 PM
To: 'Ryan Jameson (USA)'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] postgresql vs mysql


I've worked with both extensively. My personal preference is PG. However, here are my 
findings over the years.

The biggest factor in performance is the size of the database, more than anything 
else. If you have a small and relatively simple RDB structure, MySQL is significantly 
faster. (this is changing however. PG has made some significant improvements in speed 
this last year, but MySQL is improving performance considerably with larger and more 
complex RDBs.)

PG has a much flatter performance line regardless of db size, whereas MySQL just gets 
much slower and slower as the db MB increases.

-D 
AdPak Communications, Inc.
Network Security Products, Sales  Support
(623) 936-4800 * Toll Free 1-888-600-7066 * Fax: (623) 936-4111 Who Is Watching Your 
Network?
Corporate/Sales/Service: www.adpak.com
 
-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 26, 2002 1:18 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] postgresql vs mysql


There's a substantiated rumor that says postgres is faster for complex queries.

 Ryan

-Original Message-
From: Ellen Solomon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] postgresql vs mysql


I'm starting a project for which the lead programmer wants to use postgresql.  I'll be 
working in php.  Any major disadvantages to postgresql over mysql, other than mysql 
seems to be more widespread?

TIA
Ellen


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] postgresql vs mysql

2002-12-27 Thread John W. Holmes
I wish they had included PG on that list of databases. That would have
been good to see regardless of the results. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

 -Original Message-
 From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 3:58 PM
 To: David Bryant; Ryan Jameson (USA); [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql
 
 This is why i was amazed to see this :
 http://www.mysql.com/eweek/index.html
 
 -Original Message-
 From: David Bryant [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 10:43 PM
 To: 'Ryan Jameson (USA)'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql
 
 
 I've worked with both extensively. My personal preference is PG.
However,
 here are my findings over the years.
 
 The biggest factor in performance is the size of the database, more
than
 anything else. If you have a small and relatively simple RDB
structure,
 MySQL is significantly faster. (this is changing however. PG has made
some
 significant improvements in speed this last year, but MySQL is
improving
 performance considerably with larger and more complex RDBs.)
 
 PG has a much flatter performance line regardless of db size, whereas
 MySQL just gets much slower and slower as the db MB increases.
 
 -D
 AdPak Communications, Inc.
 Network Security Products, Sales  Support
 (623) 936-4800 * Toll Free 1-888-600-7066 * Fax: (623) 936-4111 Who Is
 Watching Your Network?
 Corporate/Sales/Service: www.adpak.com
 
 -Original Message-
 From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 1:18 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql
 
 
 There's a substantiated rumor that says postgres is faster for complex
 queries.
 
  Ryan
 
 -Original Message-
 From: Ellen Solomon [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 12:58 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] postgresql vs mysql
 
 
 I'm starting a project for which the lead programmer wants to use
 postgresql.  I'll be working in php.  Any major disadvantages to
 postgresql over mysql, other than mysql seems to be more widespread?
 
 TIA
 Ellen
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: crosstab for MS SQL

2002-12-27 Thread MWCT - Markus Weber
Have you tried the MS Access Syntax ? - e.g.:

TRANSFORM Sum(cube_by_c.netc_bd) AS [Summe von netc_bd]
SELECT cube_by_c.pthr_product_c AS PROD_C, xref_prod.pthr_desc_x AS [DESC]
FROM cube_by_c LEFT JOIN xref_prod ON cube_by_c.pthr_product_c =
xref_prod.pthr_product_c
WHERE (((cube_by_c.country_iso3_c)=DEU))
GROUP BY cube_by_c.pthr_product_c, xref_prod.pthr_desc_x
PIVOT cube_by_c.mm;

regards,
markus



Sommai Fongnamthip [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 MySQL has a method to write Crosstab method but It can't use with MS
 SQL.  Did someone know how to write SQL statement for make cross tab with
 MS SQL 6.5 (both ODBC and TDS connection)?

 Thank you
 SF




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] postgresql vs mysql

2002-12-27 Thread Yasuo Ohgaki
This benchmark do not help much in real life, if one care database
performance.

Database performance will vary a lot with configuration/schema/query/etc.
It's very easy to make one is better while another is not.

I suggest to take benchmark by yourself with schema and query that
is similar to production system. (Don't forget to test with large enough
data)

BTW, SourceForge.net is using PostgreSQL. It's one of the biggest web site
using PostgreSQL that I know of. (I mean SourceForge.net system itself, not
database service available from sf.net. MySQL was more suitable for sharing
database server with many users until PostgreSQL 7.3)

--
Yasuo Ohgaki

Boaz Yahav wrote:

This is why i was amazed to see this : http://www.mysql.com/eweek/index.html

-Original Message-
From: David Bryant [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 26, 2002 10:43 PM
To: 'Ryan Jameson (USA)'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] postgresql vs mysql


I've worked with both extensively. My personal preference is PG. However, here are my findings over the years.

The biggest factor in performance is the size of the database, more than anything else. If you have a small and relatively simple RDB structure, MySQL is significantly faster. (this is changing however. PG has made some significant improvements in speed this last year, but MySQL is improving performance considerably with larger and more complex RDBs.)

PG has a much flatter performance line regardless of db size, whereas MySQL just gets much slower and slower as the db MB increases.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] postgresql vs mysql

2002-12-27 Thread Garry Climacosa
i emailed the author (dyck timothy) of this article (server database clash)
by eweek he told me that they benchmark DB's according to market share that
is why they didnt included PG (not widely used).

- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Boaz Yahav' [EMAIL PROTECTED]; 'David Bryant'
[EMAIL PROTECTED]; 'Ryan Jameson (USA)' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, December 28, 2002 5:12 AM
Subject: RE: [PHP-DB] postgresql vs mysql


I wish they had included PG on that list of databases. That would have
been good to see regardless of the results.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

 -Original Message-
 From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 3:58 PM
 To: David Bryant; Ryan Jameson (USA); [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql

 This is why i was amazed to see this :
 http://www.mysql.com/eweek/index.html

 -Original Message-
 From: David Bryant [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 10:43 PM
 To: 'Ryan Jameson (USA)'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql


 I've worked with both extensively. My personal preference is PG.
However,
 here are my findings over the years.

 The biggest factor in performance is the size of the database, more
than
 anything else. If you have a small and relatively simple RDB
structure,
 MySQL is significantly faster. (this is changing however. PG has made
some
 significant improvements in speed this last year, but MySQL is
improving
 performance considerably with larger and more complex RDBs.)

 PG has a much flatter performance line regardless of db size, whereas
 MySQL just gets much slower and slower as the db MB increases.

 -D
 AdPak Communications, Inc.
 Network Security Products, Sales  Support
 (623) 936-4800 * Toll Free 1-888-600-7066 * Fax: (623) 936-4111 Who Is
 Watching Your Network?
 Corporate/Sales/Service: www.adpak.com

 -Original Message-
 From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 1:18 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] postgresql vs mysql


 There's a substantiated rumor that says postgres is faster for complex
 queries.

  Ryan

 -Original Message-
 From: Ellen Solomon [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 26, 2002 12:58 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] postgresql vs mysql


 I'm starting a project for which the lead programmer wants to use
 postgresql. I'll be working in php. Any major disadvantages to
 postgresql over mysql, other than mysql seems to be more widespread?

 TIA
 Ellen


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: calendar system

2002-12-27 Thread Manuel Lemos
Hello,

On 12/27/2002 06:20 PM, Edward Peloke wrote:

I need to create a basic calendar page for my office where people can post
their days off.  All the data will be stored in the mysql db.  Does anyone
know of any good code I an use to get me started?  I have seen a lot online
of calendar systems but I just want something to start with, not a finished
product.


You may want to try this class. It displays the calendar months that you 
specify. You can sub-class it to override the data or details of 
presentation of calendar table cells. An example sub-class is provided 
to show how to do that.

http://www.phpclasses.org/calendargenerator


--

Regards,
Manuel Lemos


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Flow diagrams

2002-12-27 Thread Manuel Lemos
Hello,

On 12/27/2002 06:00 PM, Sridhar Moparthy wrote:

I have information about some processes in the database that tells different
process dependencies. I need to display that information as a process flow
diagram. Do you know how to prepare and display process flow diagrams
dynamically. Do you know anything like JPGraph or Java script or java applet
that can do this? If so Please help me.


As I explained before, you may want to take a look at Metastorage. Among 
other things it generates graphs in UML that represent a diagram of 
classes that are mapped to database tables.

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html

Metastorage generates the graphs that can be rendered in many common 
image formats using ATT GraphViz package. GraphViz takes a description 
of the nodes and the edges of the graphs and renders them in target 
image format.

In the pages above there are some links to the relevant GraphViz pages.


--

Regards,
Manuel Lemos


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] postgresql vs mysql

2002-12-27 Thread John W. Holmes
 This benchmark do not help much in real life, if one care database
 performance.

Did you even read the article? They used a real-world bookstore
application called Nile written in JSP and tested it with 50 to 1,000
concurrent users.
 
 Database performance will vary a lot with
configuration/schema/query/etc.
 It's very easy to make one is better while another is not.

Yes, that's why they fine tuned each one. They also invited each company
to send representatives to help them tune it. Only MySQL and Sybase did
so, IMB offered suggestions over email and apparently Oracle and
Microsoft couldn't be bothered. 

 I suggest to take benchmark by yourself with schema and query that
 is similar to production system. (Don't forget to test with large
enough
 data)

Yes, perhaps you can loan me the money to get Oracle and MSSQL licenses
so I can test them out?

I understand what you're saying, every application is different. Yes, I
agree, but for those that can't afford to do extensive benchmarking like
this, we have to use these results and assume ours will be the same. 

What's this got to do with PHP? Nada... Happy New Year!

---John Holmes...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] postgresql vs mysql

2002-12-27 Thread Yasuo Ohgaki
John W. Holmes wrote:

This benchmark do not help much in real life, if one care database
performance.



Did you even read the article? They used a real-world bookstore
application called Nile written in JSP and tested it with 50 to 1,000
concurrent users.


Real life differs from systems to systems :)
It is useful to see how dbms performs, but performance
of dbms heavily depends of how users use them.
(Isn't MySQL have severe performance penalty with complex
query like sub query?)


Yes, perhaps you can loan me the money to get Oracle and MSSQL licenses
so I can test them out?


I thought original poster would like to compare PostgreSQL
and MySQL.



What's this got to do with PHP? Nada... Happy New Year!


Compare performance PostgreSQL and MySQL using PHP?

Have a happy new year.

--
Yasuo Ohgaki


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] image size

2002-12-27 Thread Petre NICOARA
Hi guys,
Do you know any methods or code for finding out the images width 
height either with php or javascript
I have a little trouble manipulating the big images. Also, I don't keep
the images in the database, are files on a server.

Thanks,
Petre NICOARA



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] image size

2002-12-27 Thread John Coder


Hi guys,
Do you know any methods or code for finding out the images width 
height either with php or javascript
I have a little trouble manipulating the big images. Also, I don't keep
the images in the database, are files on a server.

look at 
http://www.php.net/manual/en/function.getimagesize.php

John Coder
Thanks,
Petre NICOARA



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php