[PHP-DB] Performance: why it take so long time?

2001-07-10 Thread Stefano

Hi.
I am using PHP4+Apache 1.3.14 (win32)+[Access-local | Oracle-remote] with
very simple query on small tables.
When I start the page.php it takes several second to display the results: it
seems that it is waiting someting; if there are many rows, it displays a
portion of it at time (in terms of Kbytes 150, then other 150 and so on).

The question is: there are some variable configuration in Apaches or some
tips to use in the PHP code for fastening the replay? (For exaple i faund
that in a PHP page that display a FORM, the displaing time is smaller if I
do some calculation in the code than if I don't use it)

Thanks for support.
Stefano

PS: I apologise for my English



-- 
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] parsing checkbox array without [] and selecting all boxes

2001-07-10 Thread Michael Rudel

Hi Olinux,

U may want 2 try this js-code:

function ToggleAllCheckboxes()
{
   for( var x = 0; x  document.MYFORM.elements.length; x++ )
   {
  var y = document.MYFORM.elements[x];
  if( y.name != 'CHECKALL') y.checked = document.MYFORM.CHECKALL.checked;
   }
}

As U C, U have 2 setup a checkbox named 'CHECKALL'.

Most of the Freemailers use this script (or alike), too.

Of course you can now use a checkbox-array using [].

Hope this helps.

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
___

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
___



 -Original Message-
 From: olinux [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 1:43 AM
 To: php-db
 Subject: [PHP-DB] parsing checkbox array without [] and selecting all
 boxes


 Hey all,

 The end result of all of this should be similar to an online
 email client
 like hotmal, or yahoo where  you can select a number of messages to be
 deleted.

 I have a form that when generated, the html looks similar to this:

 ===

 input type=checkbox name=broker value=1
 input type=checkbox name=broker value=2
 input type=checkbox name=broker value=3
 input type=checkbox name=broker value=4
 input type=checkbox name=broker value=5

 input type=button value=Check All
 onClick=this.value=check(this.form.broker)

 ===

 I am trying to create a script that will delete each checked
 box. I can get
 this script to work by adding '[]' to 'broker'  The reason
 for each name
 being the same and not using the '[]' is because I want to be
 able to use a
 javascript that selects all boxes. Is there a way to do this.
 Or better yet,
 does anyone have a jscript that will work with the [] characters?

 Thanks
 olinux


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://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] Re: Performance: why it take so long time?

2001-07-10 Thread Soeren Nielsen

Hi Stefano

I don't know if this is what you are looking for.
Take a look at the flush() function which should bring output faster to
the browser.

Hope it help

Cheers
Soeren

- Original Message -
From: Stefano [EMAIL PROTECTED]
 The question is: there are some variable configuration in Apaches or
some
 tips to use in the PHP code for fastening the replay? (For exaple i
faund
 that in a PHP page that display a FORM, the displaing time is smaller
if I
 do some calculation in the code than if I don't use it)




-- 
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] How to use GnuPG to store data on MySQL

2001-07-10 Thread Tomas Garcia Ferrari

Hello,

I'm trying to store some encrypted data on MySQL using GnuPG and eventually
send this information via e-mail. Is somebody using this solution? Has
somebody links on this topic where I can look and see how to do it?

Regards,
Tomás

+-- --+
   Tomás García Ferrari
   Bigital
   http://bigital.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] PHP4-ODBC-MSSQL7

2001-07-10 Thread Michael Yevdokimov

Hello Everyone!!

We are making on the project with PHP4 and MSSQL7. Everything is based on
NT4 platform.
Certainly, in this case we are operating by SQL stored procedures.

The question is..

I found some problems while extracting data from database over ODBC
which we need to use to make a bridge between PHP and MSSQL.

For example, we created a table with columns:

col_subj_id int
col_subj_owner_id int
col_subj_last_update timestamp(8)
col_subj_title varchar(512)
col_subj_content text(16)
col_subj_keywords varchar(256)
col_subj_secur int
col_subj_reg_page varchar(128)


Then I try to execute a stored procedure usp_get_subj:

Create Procedure usp_get_subj
(
@subj_id int
)
As
SELECT  *
FROM tbl_subject
WHERE col_subj_id = @subj_id

RETURN

Well, everything is working in Query Analyzer and in ASP but not in
PHP...

If obviously to define the column names like:

SELECT
col_subj_id,
col_subj_owner_id,
col_subj_last_update,
col_subj_title,
col_subj_content,
col_subj_keywords,
col_subj_secur,
col_subj_reg_page
FROM tbl_subject
WHERE col_subj_id = @subj_id

it will not be working either...

But! If to order the columns in the query of the stored procedure by
data types like:

SELECT  col_subj_id, -- int
col_subj_owner_id, -- int
col_subj_secur, -- int
col_subj_last_update, -- timestamp(8)
col_subj_title, -- varchar(512)
col_subj_reg_page, -- varchar(128)
col_subj_keywords, -- varchar(2560
col_subj_content -- text(16)
FROM tbl_subject
WHERE col_subj_id = @subj_id


everything will be working pretty good..


WHY?

Do you have any ideas on this subject? ;-)

Hope to obtain help from your side..

Thank you in advance.

Mike

P.S.

The friend of mine who is ASP programmer just told me that there was such a
problem with the old versions of ODBC. I am not sure but I am afraid that
the PHP's  ODBC support is aimed on that old ODBC driver. Could anyone
advice me anything on this subject please?

?php
 include ('config.inc');

 // script itself:

 $rs_gp = call_stored_procedure(usp_get_subj $QUERY_subj);
 while (fetch_row($rs_gp)) {
 $DB_home_text = get_field($rs_gp, col_subj_content);
 }
 $rs_gp = ;
?


?php
 // config.inc

 // database settings
 $DB_dsn = dsn_sundown;
 $DB_user = sundown;
 $DB_pass = ;
 include ('database.php');
?

?php
 // database.inc

 // call the stored procedure
 function call_stored_procedure($query)
 {
 $conn = get_connection($GLOBALS[DB_dsn], $GLOBALS[DB_user],
$GLOBALS[DB_pass]);
 $result = odbc_exec($conn, $query);
 return $result;
 odbc_close($conn);
 };

 // get the connection handle
 function get_connection($dsn, $user, $pass)
 {
$GLOBALS[conn] = odbc_connect($dsn, $user, $pass);
return $GLOBALS[conn];
 };

 // retrieve the row of data
 function fetch_row($rs)
 {
return odbc_fetch_row($rs);
 };

 // retrieve the field of data
 function get_field($rs, $field)
 {

if (!$rs)
{
$res = No data was returned..;
}

if ($rs)
{

$res = odbc_result($rs, $field);
/*
$no_r = odbc_num_rows($rs);
$no_f = odbc_num_fields($rs);

for ($i=1; $i=$no_f; $i++)
{
$fn = odbc_field_name ($rs, $i);
if ($fn == $field)
{
$res = odbc_result($rs, $field);
break;
}
}
*/
}
return $res;
 };
?


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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] finding out the result of an INSERT

2001-07-10 Thread Michael Rudel

RTFM or search in the archive of this mailinglist !!!

int mysql_insert_id ([int link_identifier])

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
___

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
___



 -Original Message-
 From: Cable, Christian [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 12:52 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] finding out the result of an INSERT


 Hi,

 this might be a stupid question but it's got me stumped today

 My setup: php, mysql, apache etc

 I'm inserting a record into a table that's got a primary key
 which is auto
 incrementing ..

 +---+---+--+-+-+--
 --+
 | Field | Type  | Null | Key | Default |
 Extra  |
 +---+---+--+-+-+--
 --+
 | message_id| int(11)   |  | PRI | NULL|
 auto_increment |
 | message_text  | mediumtext| YES  | | NULL|
   |
 | topic_id  | int(11)   | YES  | | NULL|
   |
 | user_id   | int(11)   | YES  | | NULL|
   |
 | message_title | varchar(50)   | YES  | | NULL|
   |
 | message_time  | timestamp(14) | YES  | | NULL|
   |
 | parent_id | int(11)   | YES  | | NULL|
   |
 | thread_id | int(11)   | YES  | | NULL|
   |
 +---+---+--+-+-+--
 --+

 by doing

 $sql = INSERT INTO messagetable(user_id, message_title,
 message_text,topic_id,
 thread_id, parent_id) VALUES
 ('$userid','$subject','$comment','$topic_id','$thread_id','$pa
 rent_id');
 mysql_query($sql);

 which works fine BUT is there any way of finding out the
 message_id of the
 record I just inserted ?

 with thanks

 Christian


 Christian Cable
 ICT Assistant
 Careers Service; Lancaster University
 Tel: (01524) 594072  Fax: (01524) 592072
 http://www.lancs.ac.uk/staff/cable/



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




AW: [PHP-DB] PHP4-ODBC-MSSQL7

2001-07-10 Thread Stefan Siefert

Hi,

I'm not sure about the probeme you have, but if the probleme is based on
ODBC, why do use ODBC? You could also use the Sybase-Ct libs.. should work
also with MSSQL...

Greetings,
Stefan


-Ursprüngliche Nachricht-
Von: Michael Yevdokimov [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. Juli 2001 13:09
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] PHP4-ODBC-MSSQL7


Hello Everyone!!

We are making on the project with PHP4 and MSSQL7. Everything is based on
NT4 platform.
Certainly, in this case we are operating by SQL stored procedures.

The question is..

I found some problems while extracting data from database over ODBC
which we need to use to make a bridge between PHP and MSSQL.

For example, we created a table with columns:

col_subj_id int
col_subj_owner_id int
col_subj_last_update timestamp(8)
col_subj_title varchar(512)
col_subj_content text(16)
col_subj_keywords varchar(256)
col_subj_secur int
col_subj_reg_page varchar(128)


Then I try to execute a stored procedure usp_get_subj:

Create Procedure usp_get_subj
(
@subj_id int
)
As
SELECT  *
FROM tbl_subject
WHERE col_subj_id = @subj_id

RETURN

Well, everything is working in Query Analyzer and in ASP but not in
PHP...

If obviously to define the column names like:

SELECT
col_subj_id,
col_subj_owner_id,
col_subj_last_update,
col_subj_title,
col_subj_content,
col_subj_keywords,
col_subj_secur,
col_subj_reg_page
FROM tbl_subject
WHERE col_subj_id = @subj_id

it will not be working either...

But! If to order the columns in the query of the stored procedure by
data types like:

SELECT  col_subj_id, -- int
col_subj_owner_id, -- int
col_subj_secur, -- int
col_subj_last_update, -- timestamp(8)
col_subj_title, -- varchar(512)
col_subj_reg_page, -- varchar(128)
col_subj_keywords, -- varchar(2560
col_subj_content -- text(16)
FROM tbl_subject
WHERE col_subj_id = @subj_id


everything will be working pretty good..


WHY?

Do you have any ideas on this subject? ;-)

Hope to obtain help from your side..

Thank you in advance.

Mike

P.S.

The friend of mine who is ASP programmer just told me that there was such a
problem with the old versions of ODBC. I am not sure but I am afraid that
the PHP's  ODBC support is aimed on that old ODBC driver. Could anyone
advice me anything on this subject please?

?php
 include ('config.inc');

 // script itself:

 $rs_gp = call_stored_procedure(usp_get_subj $QUERY_subj);
 while (fetch_row($rs_gp)) {
 $DB_home_text = get_field($rs_gp, col_subj_content);
 }
 $rs_gp = ;
?


?php
 // config.inc

 // database settings
 $DB_dsn = dsn_sundown;
 $DB_user = sundown;
 $DB_pass = ;
 include ('database.php');
?

?php
 // database.inc

 // call the stored procedure
 function call_stored_procedure($query)
 {
 $conn = get_connection($GLOBALS[DB_dsn], $GLOBALS[DB_user],
$GLOBALS[DB_pass]);
 $result = odbc_exec($conn, $query);
 return $result;
 odbc_close($conn);
 };

 // get the connection handle
 function get_connection($dsn, $user, $pass)
 {
$GLOBALS[conn] = odbc_connect($dsn, $user, $pass);
return $GLOBALS[conn];
 };

 // retrieve the row of data
 function fetch_row($rs)
 {
return odbc_fetch_row($rs);
 };

 // retrieve the field of data
 function get_field($rs, $field)
 {

if (!$rs)
{
$res = No data was returned..;
}

if ($rs)
{

$res = odbc_result($rs, $field);
/*
$no_r = odbc_num_rows($rs);
$no_f = odbc_num_fields($rs);

for ($i=1; $i=$no_f; $i++)
{
$fn = odbc_field_name ($rs, $i);
if ($fn == $field)
{
$res = odbc_result($rs, $field);
break;
}
}
*/
}
return $res;
 };
?


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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]




Re: [PHP-DB] finding out the result of an INSERT

2001-07-10 Thread Roger Ramirez

http://php.net/manual/en/function.mysql-insert-id.php

 from the link above 
Warning:
mysql_insert_id() converts the return type of the native MySQL C API
function mysql_insert_id() to a type of long. If your AUTO_INCREMENT column
has a column type of BIGINT, the value returned by mysql_insert_id() will be
incorrect. Instead, use the internal MySQL SQL function LAST_INSERT_ID().


- Original Message -
From: Cable, Christian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 6:51 AM
Subject: [PHP-DB] finding out the result of an INSERT


 Hi,

 this might be a stupid question but it's got me stumped today

 My setup: php, mysql, apache etc

 I'm inserting a record into a table that's got a primary key which is auto
 incrementing ..

 +---+---+--+-+-++
 | Field | Type  | Null | Key | Default | Extra  |
 +---+---+--+-+-++
 | message_id| int(11)   |  | PRI | NULL| auto_increment |
 | message_text  | mediumtext| YES  | | NULL||
 | topic_id  | int(11)   | YES  | | NULL||
 | user_id   | int(11)   | YES  | | NULL||
 | message_title | varchar(50)   | YES  | | NULL||
 | message_time  | timestamp(14) | YES  | | NULL||
 | parent_id | int(11)   | YES  | | NULL||
 | thread_id | int(11)   | YES  | | NULL||
 +---+---+--+-+-++

 by doing

 $sql = INSERT INTO messagetable(user_id, message_title,
message_text,topic_id,
 thread_id, parent_id) VALUES
 ('$userid','$subject','$comment','$topic_id','$thread_id','$parent_id');
 mysql_query($sql);

 which works fine BUT is there any way of finding out the message_id of the
 record I just inserted ?

 with thanks

 Christian


 Christian Cable
 ICT Assistant
 Careers Service; Lancaster University
 Tel: (01524) 594072  Fax: (01524) 592072
 http://www.lancs.ac.uk/staff/cable/



 --
 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: problem with form

2001-07-10 Thread Johannes Janson

Hi,

 hope anyone has an idea on how to fix this...

 form
 input type=submit name=Submit value=Submit Request
 OnClick=submit.php class=button
 input type=submit name=Edit value=Edit Request OnClick=edit.php
 class=button
 /form

you could give the form one action and then check on the following page
wether $Submit or $Edit is set.

form.php
form action=doit.php method=post
...
/form

doit.php
?php

if(isset($submit)) {
do this, display that
}
if (isset($edit)) {
alter this, whatever
}

cheers
Johannes



-- 
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: problem with form

2001-07-10 Thread Hugh Bothwell

Try setting form.action and using form.submit() to send it ('edit.php' is
not valid javascript).

Here:

htmlheadscript!--
function submitTo(form, url) {
form.action = url;
form.submit();
}
--/script/headbody
form name=f action=submit.php
input type=submit
name=Submit
value=Submit Request
onclick=submitTo(document.f, 'submit.php')

input type=submit
name=Edit
value=Edit Request
onclick=submitTo(document.f, 'edit.php')

/form
/body

Note that this includes a fall-back: if JavaScript is not supported, the
form will be submitted by either button.

Jennifer Arcino Demeterio [EMAIL PROTECTED] wrote in message
000a01c1092d$0c3baba0$[EMAIL PROTECTED]">news:000a01c1092d$0c3baba0$[EMAIL PROTECTED]...
 hello,

 hope anyone has an idea on how to fix this...

 form
 input type=submit name=Submit value=Submit Request
 OnClick=submit.php class=button
 input type=submit name=Edit value=Edit Request OnClick=edit.php
 class=button
 /form

 even i click on the edit button, it will still go to submit.php page, why
is
 that?

 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] How to use GnuPG to store data on MySQL

2001-07-10 Thread php

Yes :-
http://www.alt-php-faq.org/#id65

Regards
Darren
http://www.php4hosting.com

 -Original Message-
 From: Tomas Garcia Ferrari [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2001 12:02
 To: 'php-db'
 Subject: [PHP-DB] How to use GnuPG to store data on MySQL


 Hello,

 I'm trying to store some encrypted data on MySQL using GnuPG and
 eventually
 send this information via e-mail. Is somebody using this solution? Has
 somebody links on this topic where I can look and see how to do it?

 Regards,
 Tomás

 +-- --+
Tomás García Ferrari
Bigital
http://bigital.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]




RE: [PHP-DB] PHP4-ODBC-MSSQL7

2001-07-10 Thread Andrew Hill

Micheal,

If things work in Query but not PHP you can easily get an under-the-covers
comparison of the ODBC calls by turning on Tracing in the ODBC Administrator
(Driver Manager).

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

 -Original Message-
 From: Michael Yevdokimov [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 7:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] PHP4-ODBC-MSSQL7


 Hello Everyone!!

 We are making on the project with PHP4 and MSSQL7. Everything is based on
 NT4 platform.
 Certainly, in this case we are operating by SQL stored procedures.

 The question is..

 I found some problems while extracting data from database over ODBC
 which we need to use to make a bridge between PHP and MSSQL.

 For example, we created a table with columns:

 col_subj_id int
 col_subj_owner_id int
 col_subj_last_update timestamp(8)
 col_subj_title varchar(512)
 col_subj_content text(16)
 col_subj_keywords varchar(256)
 col_subj_secur int
 col_subj_reg_page varchar(128)


 Then I try to execute a stored procedure usp_get_subj:

 Create Procedure usp_get_subj
 (
 @subj_id int
 )
 As
 SELECT  *
 FROM tbl_subject
 WHERE col_subj_id = @subj_id

 RETURN

 Well, everything is working in Query Analyzer and in ASP but not in
 PHP...

 If obviously to define the column names like:

 SELECT
 col_subj_id,
 col_subj_owner_id,
 col_subj_last_update,
 col_subj_title,
 col_subj_content,
 col_subj_keywords,
 col_subj_secur,
 col_subj_reg_page
 FROM tbl_subject
 WHERE col_subj_id = @subj_id

 it will not be working either...

 But! If to order the columns in the query of the stored procedure by
 data types like:

 SELECT  col_subj_id, -- int
 col_subj_owner_id, -- int
 col_subj_secur, -- int
 col_subj_last_update, -- timestamp(8)
 col_subj_title, -- varchar(512)
 col_subj_reg_page, -- varchar(128)
 col_subj_keywords, -- varchar(2560
 col_subj_content -- text(16)
 FROM tbl_subject
 WHERE col_subj_id = @subj_id


 everything will be working pretty good..


 WHY?

 Do you have any ideas on this subject? ;-)

 Hope to obtain help from your side..

 Thank you in advance.

 Mike

 P.S.

 The friend of mine who is ASP programmer just told me that there
 was such a
 problem with the old versions of ODBC. I am not sure but I am afraid that
 the PHP's  ODBC support is aimed on that old ODBC driver. Could anyone
 advice me anything on this subject please?

 ?php
  include ('config.inc');

  // script itself:

  $rs_gp = call_stored_procedure(usp_get_subj $QUERY_subj);
  while (fetch_row($rs_gp)) {
  $DB_home_text = get_field($rs_gp, col_subj_content);
  }
  $rs_gp = ;
 ?


 ?php
  // config.inc

  // database settings
  $DB_dsn = dsn_sundown;
  $DB_user = sundown;
  $DB_pass = ;
  include ('database.php');
 ?

 ?php
  // database.inc

  // call the stored procedure
  function call_stored_procedure($query)
  {
  $conn = get_connection($GLOBALS[DB_dsn], $GLOBALS[DB_user],
 $GLOBALS[DB_pass]);
  $result = odbc_exec($conn, $query);
  return $result;
  odbc_close($conn);
  };

  // get the connection handle
  function get_connection($dsn, $user, $pass)
  {
 $GLOBALS[conn] = odbc_connect($dsn, $user, $pass);
 return $GLOBALS[conn];
  };

  // retrieve the row of data
  function fetch_row($rs)
  {
 return odbc_fetch_row($rs);
  };

  // retrieve the field of data
  function get_field($rs, $field)
  {

 if (!$rs)
 {
 $res = No data was returned..;
 }

 if ($rs)
 {

 $res = odbc_result($rs, $field);
 /*
 $no_r = odbc_num_rows($rs);
 $no_f = odbc_num_fields($rs);

 for ($i=1; $i=$no_f; $i++)
 {
 $fn = odbc_field_name ($rs, $i);
 if ($fn == $field)
 {
 $res = odbc_result($rs, $field);
 break;
 }
 }
 */
 }
 return $res;
  };
 ?


 Michael Yevdokimov
 Web developer
 e-mail: [EMAIL PROTECTED]

 
 Globalocity B.V.
 Tel.: +31 (0)70 312 2814
 Fax.: +31 (0)70 312 2808
 http://www.globalocity.com
 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 

RE: [PHP-DB] testing ODBC + MSSQL connection locally

2001-07-10 Thread Andrew Hill

olinux,

When you move to remote connections and want to compile ODBC support into
PHP on a *nix box, you will need a Driver Manager in the mix as well as the
ODBC Drivers.

There is a HOWTO on compiling the iODBC Driver Manager with PHP at
www.iodbc.org.

Basically, it involves getting the iODBC SDK and
using --with-iodbc=/path/to/odbcsdk
Let me know if you require assistance.

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

 -Original Message-
 From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 7:22 PM
 To: olinux
 Cc: php-db
 Subject: Re: [PHP-DB] testing ODBC + MSSQL connection locally


 Hi,

  I would like to begin learning ODBC. Will I be able to set this up on my
  single local machine?

 The ODBC functions are build in when you are running PHP on a
 Windows Box. If you are running on a (nix box you have to compile
 PHP with support for ODBC.

  Also, What about connecting to MS SQL server remotely? Will i
 simply need an
  IP Port and user/pass?

 If The MS SQL Server is configured to use TCP/IP you can use this
 to communicate with the server. If the Server uses named pipes
 you can uses this from a Windows box only.

 The MSSQL Server can be accessed using ODBC or the native mssql_*
 functions. You can enable the mssql functions by uncommenting
 ;extension=php_mssql.dll in php.ini. This requires that you are
 running on Windws and you install the client tools from MS SQL
 Server on yor PHP box.

 With ODBC and native MSSQL you can access remote or local databases.

 - Frank
 
  Thank you
 
  olinux
 
 





 --
 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] IBM DB2 on Linux with PHP is very slow

2001-07-10 Thread Andrew Hill

Christian,

Are you using an ODBC driver or just the unified-ODBC functions?
If a driver, then I suggest changing vendors - that performance is in no way
representative of ODBC in general.
In addition, to improve performance even more when using similar queries,
first use odbc_prepare to prepare a parameter-bound query and then use
odbc_execute to create the result set for specific parameter values.

You may wish to try our Multi-Tier drivers at http://www.openlinksw.com.
Multi-Tier UDA is exceptionally fast and secure, and downloads with a free,
non-expiring 2 user license.
In addition, free support is available at
http://www.openlinksw.com/support/suppindx.htm

Please let me know if you require assistance.

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

 -Original Message-
 From: news.php.net [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 5:59 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] IBM DB2 on Linux with PHP is very slow



 Hi,

 does someone has a DB2 UDB from IBM working with
 PHP in a production envirement ? How is the performance?

 For a relaunch of our existing production system running
 on IBM DB2 on serveral IBM RS/6000 servers we tested
 the performance of connecting PHP to this database.

 And what can I say: It's very slow. For example:
 A simple SELECT Query giving 100 records as result
 takes about 6 until 10 seconds(!!!) when using PHP.

 In detail: Connecting to Database lasts about 0.01 - 0.05 seconds (so, 10
 ms - 50 ms),
 sending the query (odbc_exec... ) lasts about the same time.

 Then the bottleck: reading each record with odbc_fetch_into lasts
 between 0.02 till sometimes 2 (two seconds!!!).

 Now maybe you guess it's a problem of the DB2? We tested
 the same query on the same server with a simple java-servlet with
 jdbc, and the whole thing (connecting, query, and getting all records)
 lasts about 0.09 till 0.2 seonds

 So PHP is almost 300% till 500% slower!! I searched all
 newsgroups and I found some people that has/had the same
 problems.

 We couldn't solve that problem by removing the TCP/IP
 Problem of DB2 (setting some value ...mgnr = 1, i don't
 remember it's name :-))).

 No our CEO says, we should code the application in JAVA,
 but that seems a very poor solution for us. So my question:
 Does anybody had similar problems and solved it? Or is
 anybody willing to help us? Maybe we can find some other
 companies/people that also want to connect to DB2 with
 a good performance, and we could improve the DB2 functions
 of PHP or writing our own??

 Or whats with other databases: are there similar problems
 with Oracle??? Oralce would be a great idea, but we
 spent some huge amount on the db2 so maybe it's
 no good idea to put the db2 into the trashcan and buy
 oracle for thousands of dollars. What's with Postgres? Our
 problem is that we must store 10 million records a month,
 and the database shouldn't have a problem with this.

 Thank you for reading this, and maybe someone
 can help,

 Kind regards,
 Christian Szardenings





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

2001-07-10 Thread COFOR

Jacarilla 8.7.2001.Publicidad/Enseñanza a Distancia 
 
 
  Hola que tal:
 
  El motivo de la presente carta es informarte de la posibilidad de poder 
realizar algún curso a distancia de tu interés, cursos relacionados con tu 
trabajo inquietudes  y ocio.ect.El conocimiento es el mayor patrimonio de 
que podemos disponer.
 
  Nos dedicamos desde 1996.a impartir cursos a distancia disponemos 
de una amplia variedad de cursos sencillos  para poder seguirlos 
comodamente desde cualquier parte del mundo y a unos precios muy 
competitivos.
  
 
NET

Comercio Electrónico
Redes y Sistemas
Sistemas Servers
Diseño Web
Direccion Empresa Net
Management  Business
 
BUSSINES

Gestor Comercial y Marketing
Marketing Mix 
Relaciones Publicas
Dirección Planificación de Empresa
Recursos Humanos
Comercio Exterior
Direccion Comercial
Gestión Medio Ambiental
Control de Calidad
 Management  Bussines
Dirección de Restaurantes
--
 
SALUD SUPERACION PERSONAL
-
Superación de Estrés
Psicoterapia
Dietética y Nutrición
Dieta Mediterránea 
Nutrí terapia y Salud
Nutrición y Deporte
Cocina Sana
Monitor Aeróbic-Fittnes
Monitor Yoga Tai-Chi
Hipnoterapia
Quiromasaje y Reflexoterapia
Aromaterapia
Cosmética Natural
Hierbas Medicinales
Balnoterapia y Salud
--
Los cursos  son de 200.horas lectivas el precio standar por curso es de 
35.000.pts.España a plazos.Iberoamerica 150.usa dolar aplazados.
El Diploma:
 Técnico Especialista
 El tiempo aproximado por curso dependiendo de los conocimientos en 
areas similares de que se disponga,es entre 2-6.meses.aprox.
 
Si desean que les ampliemos información pueden enviar un e-mail les 
contestaremos con la mayor brevedad y les indicaremos nuestro espacio 
web que se encuentra en reformas.
 
Envie e-mail:
  [EMAIL PROTECTED]
 [EMAIL PROTECTED] 
 
Sin otra que rogarte me envies un e-mail si estas interesado/a
Te enviamos un saludo.
 Merce Sanchez 
Gestión Integral 1.S.L
 C/ Virgen de Belén, 30
 03310 Jacarilla  (Alicante)ESPAÑA
 
Si desea no recibir mas  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] using ADODB db class

2001-07-10 Thread Mark Newnham

Not sure if this is really the right list to ask on, so please excuse me. 

I am trying to use the adodb db class with php4/mysql. On problem i have hit
is that if i retrieve 2 tables with a join and the 2 tables both have a
field of the same name, the command

$result-fields(fieldname) always returns the value of the second field of
that name.

i could loop through the fields via index, then use fetchfield() to retrieve
the name, but generically, I would also like to retrieve the table that the
field is attached to. Does anyone know of a way to do this or a command that
has this option?

Thanks

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-DB] Re: using ADODB db class

2001-07-10 Thread John Lim

Hi Mark,
You can access the column by index position instead, or use as column alias:

select a.col col1, b.col col2 from a,b where a.key = b.key

Then access using col1 and col2.

Bye, John

Mark Newnham [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Not sure if this is really the right list to ask on, so please excuse me.

 I am trying to use the adodb db class with php4/mysql. On problem i have
hit
 is that if i retrieve 2 tables with a join and the 2 tables both have a
 field of the same name, the command

 $result-fields(fieldname) always returns the value of the second field
of
 that name.

 i could loop through the fields via index, then use fetchfield() to
retrieve
 the name, but generically, I would also like to retrieve the table that
the
 field is attached to. Does anyone know of a way to do this or a command
that
 has this option?

 Thanks

 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-DB] Re: Performance: why it take so long time?

2001-07-10 Thread John Lim

Don't flush or print/echo too often. This generates many fragmented tcp-ip
packets
(causing the behaviour you observe). The fastest method is probably
store the accumulated HTML data in a variable and print the variable every
100 rows or so.

Regards, John

Soeren Nielsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Stefano

 I don't know if this is what you are looking for.
 Take a look at the flush() function which should bring output faster to
 the browser.

 Hope it help

 Cheers
 Soeren

 - Original Message -
 From: Stefano [EMAIL PROTECTED]
  The question is: there are some variable configuration in Apaches or
 some
  tips to use in the PHP code for fastening the replay? (For exaple i
 faund
  that in a PHP page that display a FORM, the displaing time is smaller
 if I
  do some calculation in the code than if I don't use it)






-- 
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] PHP4-ODBC-MSSQL7

2001-07-10 Thread Frank M. Kromann

Hi Michael,

The should not be any issues with the oder of the columns in the select using ODBC. I 
do have some questions for you.

1) What is the reson for using stored procedures for this. The procedure you are 
showing is just a wrapper arround a SQL statement. You could as easily generate the 
SQL statement using PHP and the execute the statement.
Using stored procedures binds your application tight to the DBMS.

2) If you are using NT as webserver you could use the native MSSQL functions. These 
functions are 4-5 times faster than ODBC. The only downside about the native functions 
are the lack of support for varchar, nvarchar columns larger than 256 bytes. This is a 
limmitation in the C-library provided by Microsoft.
If you can use the Text type, this will not be a problem.

- Frank

 Hello Everyone!!
 
 We are making on the project with PHP4 and MSSQL7. Everything is based on
 NT4 platform.
 Certainly, in this case we are operating by SQL stored procedures.
 
 The question is..
 
 I found some problems while extracting data from database over ODBC
 which we need to use to make a bridge between PHP and MSSQL.
 
 For example, we created a table with columns:
 
 col_subj_id int
 col_subj_owner_id int
 col_subj_last_update timestamp(8)
 col_subj_title varchar(512)
 col_subj_content text(16)
 col_subj_keywords varchar(256)
 col_subj_secur int
 col_subj_reg_page varchar(128)
 
 
 Then I try to execute a stored procedure usp_get_subj:
 
 Create Procedure usp_get_subj
 (
 @subj_id int
 )
 As
 SELECT  *
 FROM tbl_subject
 WHERE col_subj_id = @subj_id
 
 RETURN
 
 Well, everything is working in Query Analyzer and in ASP but not in
 PHP...
 
 If obviously to define the column names like:
 
 SELECT
 col_subj_id,
 col_subj_owner_id,
 col_subj_last_update,
 col_subj_title,
 col_subj_content,
 col_subj_keywords,
 col_subj_secur,
 col_subj_reg_page
 FROM tbl_subject
 WHERE col_subj_id = @subj_id
 
 it will not be working either...
 
 But! If to order the columns in the query of the stored procedure by
 data types like:
 
 SELECT  col_subj_id, -- int
 col_subj_owner_id, -- int
 col_subj_secur, -- int
 col_subj_last_update, -- timestamp(8)
 col_subj_title, -- varchar(512)
 col_subj_reg_page, -- varchar(128)
 col_subj_keywords, -- varchar(2560
 col_subj_content -- text(16)
 FROM tbl_subject
 WHERE col_subj_id = @subj_id
 
 
 everything will be working pretty good..
 
 
 WHY?
 
 Do you have any ideas on this subject? ;-)
 
 Hope to obtain help from your side..
 
 Thank you in advance.
 
 Mike
 
 P.S.
 
 The friend of mine who is ASP programmer just told me that there was such a
 problem with the old versions of ODBC. I am not sure but I am afraid that
 the PHP's  ODBC support is aimed on that old ODBC driver. Could anyone
 advice me anything on this subject please?
 
 ?php
  include ('config.inc');
 
  // script itself:
 
  $rs_gp = call_stored_procedure(usp_get_subj $QUERY_subj);
  while (fetch_row($rs_gp)) {
  $DB_home_text = get_field($rs_gp, col_subj_content);
  }
  $rs_gp = ;
 ?
 
 
 ?php
  // config.inc
 
  // database settings
  $DB_dsn = dsn_sundown;
  $DB_user = sundown;
  $DB_pass = ;
  include ('database.php');
 ?
 
 ?php
  // database.inc
 
  // call the stored procedure
  function call_stored_procedure($query)
  {
  $conn = get_connection($GLOBALS[DB_dsn], $GLOBALS[DB_user],
 $GLOBALS[DB_pass]);
  $result = odbc_exec($conn, $query);
  return $result;
  odbc_close($conn);
  };
 
  // get the connection handle
  function get_connection($dsn, $user, $pass)
  {
 $GLOBALS[conn] = odbc_connect($dsn, $user, $pass);
 return $GLOBALS[conn];
  };
 
  // retrieve the row of data
  function fetch_row($rs)
  {
 return odbc_fetch_row($rs);
  };
 
  // retrieve the field of data
  function get_field($rs, $field)
  {
 
 if (!$rs)
 {
 $res = No data was returned..;
 }
 
 if ($rs)
 {
 
 $res = odbc_result($rs, $field);
 /*
 $no_r = odbc_num_rows($rs);
 $no_f = odbc_num_fields($rs);
 
 for ($i=1; $i=$no_f; $i++)
 {
 $fn = odbc_field_name ($rs, $i);
 if ($fn == $field)
 {
 $res = odbc_result($rs, $field);
 break;
 }
 }
 */
 }
 return $res;
  };
 ?
 
 
 Michael Yevdokimov
 Web developer
 e-mail: [EMAIL PROTECTED]
 
 
 Globalocity B.V.
 Tel.: +31 (0)70 312 2814
 Fax.: +31 (0)70 312 2808
 

[PHP-DB] MySQL Error

2001-07-10 Thread Vivek Misra

Dear Experts 

When ever i try to run MySQL under linux it gives me following error 

ERROR 2002 : can't connect to local MYSQL server through socket '/var/lib/mysql.sock' 
(111)

what could be possible remedy/rectification of the above ?

million thx in advance 

Vivek Misra 

-- 
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: MySQL Error

2001-07-10 Thread Jonathan Hilgeman

Are you running as the admin setting it up or are you a user on the system
getting the error?

Vivek Misra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear Experts

 When ever i try to run MySQL under linux it gives me following error

 ERROR 2002 : can't connect to local MYSQL server through socket
'/var/lib/mysql.sock' (111)

 what could be possible remedy/rectification of the above ?

 million thx in advance

 Vivek Misra



-- 
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] losing data from a mysql database field

2001-07-10 Thread Geoffrey Makstutis

Hi,

I'm having an odd occurrence using mysql. If I insert into a varchar field 
with information like This is the information, it works fine and I can 
retreive and display the data using a normal 'print' or 'echo' statement. 
However, if I try to display the data in a form field (so that I can edit the 
data) I only get This (ie. I am losing everything after the first 
whitespace character).

Is there anything that anyone could suggest that would solve this problem?

Thanks.

Geoffrey

-- 
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: MySQL Error

2001-07-10 Thread Johannes Janson

Hi,

 Dear Experts

 When ever i try to run MySQL under linux it gives me following error

 ERROR 2002 : can't connect to local MYSQL server through socket
'/var/lib/mysql.sock' (111)

this is with PHP isn't it? can you log in the monitor and then type SHOW
VARIABLES. A long list
will be displayed where the socket is listed aswell. Then check if the file
mysql.sock is in the
specified directory. You can also check in the my.cnf what the socket is.
I don't know the exact
path where my.cnf is located but I think on my SuSE box it was /etc Usually
it is in /tmp I think.

hope it helped
Johannes



-- 
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] Images from database

2001-07-10 Thread Randall Barber

I have seen in several places the following line:

img src='myScript.php' etc..etc..

Will this tag work in both IE and Netscape?

What does myScript.php do?  Does it find an image and pass the binary data back?

Something like this--

?php

// Code to find get a path from a database

$fp = fopen(odbc_result($qryResult, imgPath), rb);
fpassthru($fp);
fclose($fp);
?

Am I getting this, or am I missing the whole point?
Thanks
RDB



Re: [PHP-DB] Images from database

2001-07-10 Thread Benjamin Bleything

Check out http://www.phpbuilder.com/columns/florian19991014.php3.  It's a 
tutorial that explains getting images in and out of databases.  It also 
describes what this myscript.php thingy does.

Good luck,
Ben

Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Date: Tue, 10 Jul 2001 13:41:27 -0600
From: Randall Barber [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Priority: 3
X-MSMail-priority: Normal
Subject: [PHP-DB] Images from database

I have seen in several places the following line:

img src='myScript.php' etc..etc..

Will this tag work in both IE and Netscape?

What does myScript.php do?  Does it find an image and pass the binary data 
back?

Something like this--

?php

// Code to find get a path from a database

$fp = fopen(odbc_result($qryResult, imgPath), rb);
fpassthru($fp);
fclose($fp);
?

Am I getting this, or am I missing the whole point?
Thanks
RDB


-- 
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] Access Violation PLEASE HELP.

2001-07-10 Thread PHPFAN

I have the following setup.

PHP 4.04 running on windows 2000 using SQL Server 7.0

The script runs fine for sometime, then I get the following errors
PHP has encountered Access Violation at 013A2466. So I have to reboot
everytime. This happens
almost every 2 to 3 hours or so. I have to use PHP on windows 2000.

Please help.

Thank you
PHPFAN



-- 
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] PHP4 + interbase = bug?

2001-07-10 Thread Wagner R. Landgraf

Hello, I've used PHP4 + Interbase and I got a PHP Program executed an
ilegal operation bla bla bla bla. in a very very simple php script.
 
Then I switched back to PHP3 and everything is fine (well, everything
for this only little script I've tested).
 
Is this know? Is PHP4 + Interbase buggy? What about PHP3? Is it ok with
Interbase?
 
Thank you all
 
 
Wagner R. Landgraf
Automa Consultoria  Informática Ltda.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 



Re: [PHP-DB] IBM DB2 on Linux with PHP is very slow

2001-07-10 Thread Christian Szardenings

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


Andrew Hill [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Christian,

 Are you using an ODBC driver or just the unified-ODBC functions?
 If a driver, then I suggest changing vendors - that performance is in no
way
 representative of ODBC in general.
 In addition, to improve performance even more when using similar queries,
 first use odbc_prepare to prepare a parameter-bound query and then use
 odbc_execute to create the result set for specific parameter values.

 You may wish to try our Multi-Tier drivers at http://www.openlinksw.com.
 Multi-Tier UDA is exceptionally fast and secure, and downloads with a
free,
 non-expiring 2 user license.
 In addition, free support is available at
 http://www.openlinksw.com/support/suppindx.htm

 Please let me know if you require assistance.

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




-- 
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-ODBC-MSSQL (Text type fields)

2001-07-10 Thread Michael Yevdokimov

Hello

Did anybody have problems with retrieving data from the fields of type
Text..

?php
$dsn = dsn_database;
$user = enduser;
$pass = ;

$query = usp_get_subj 10;

$conn = odbc_connect($dsn, $user, $pass);
$res = odbc_exec($conn, $query);


while (odbc_fetch_row($res)) {
//$data = odbc_field_type($res, 10); // text
//$data = odbc_field_name($res, 10); // col_subj_content
//$data = odbc_field_len($res, 10); // 2147483647

$data = odbc_result($res, col_subj_content);
//$data = odbc_result($res, 10);

echo $data;
}

odbc_close($conn);
?


I can retrieve any other fields but not the field of type text.. What could
be the problem?

Thank you.

Mike

Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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] PHP-ODBC-MSSQL (Text type fields) PART II

2001-07-10 Thread Michael Yevdokimov

Hi

I found an interesting thing.. But it will just make my work much harder..
comparing to ASP... :o (which I already am not able to use in the
project we should deliver to our customer in a few weeks :o

?php
// database settings
$dsn = dsn_database;
$user = enduser;
$pass = ;

$query = EXEC usp_get_subj 10;

/*
$query = SELECTcol_subj_id,
col_cat_id,
col_lang_id,
col_subj_class,
col_subj_owner_id,
col_subj_secur,
col_subj_last_update,
col_subj_title, --varchar(512)
col_subj_reg_page, --varchar(128)
col_subj_content, -- text(16)
col_subj_keywords --varchar(256)

FROM tbl_subject WHERE col_subj_id = 10;
*/


$conn = odbc_connect($dsn, $user, $pass);
$res = odbc_exec($conn, $query);

$data = odbc_result($res, col_subj_content);
$data = odbc_result($res, 8);


echo $data;
odbc_close($conn);
?

This code will not retrieve the data from col_subj_content.. But!!
If I replace the call of the stored procedure by the same its content but as
an obviouse SQL query, everything will work and I will get the content of
this field.. Hmm... So, what is the hell is that??? Could anyone HELP me to
use the calls of sp way in the right way?!?


?php
// database settings
$dsn = dsn_database;
$user = enduser;
$pass = ;

$query = SELECTcol_subj_id,
col_cat_id,
col_lang_id,
col_subj_class,
col_subj_owner_id,
col_subj_secur,
col_subj_last_update,
col_subj_title, --varchar(512)
col_subj_reg_page, --varchar(128)
col_subj_content, -- text(16)
col_subj_keywords --varchar(2560

FROM tbl_subject WHERE col_subj_id = 10;

$conn = odbc_connect($dsn, $user, $pass);
$res = odbc_exec($conn, $query);

$data = odbc_result($res, col_subj_content);
$data = odbc_result($res, 8);


echo $data;
odbc_close($conn);
?

The stored procedure is:

Create Procedure usp_get_subj
(
@subj_id int
)
As


SELECT  col_subj_id,
col_cat_id,
col_lang_id,
col_subj_class,
col_subj_owner_id,
col_subj_secur,
col_subj_last_update,
col_subj_title, --varchar(512)
col_subj_reg_page, --varchar(128)
col_subj_content, -- text(16)
col_subj_keywords --varchar(2560

FROM tbl_subject WHERE col_subj_id = @subj_id
RETURN


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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] PHP-ODBC-MSSQL PartII

2001-07-10 Thread Michael Yevdokimov

The error which occures during the call of stored procedure is:

Warning: SQL error: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor
Index, SQL state S1002 in SQLGetData in
d:\Inetpub\wwwroot\local_test\test.php on line 43


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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] PHP-ODBC-MSSQL (NT) PART 3

2001-07-10 Thread Michael Yevdokimov

Ok.. I discovered also that everything will work pretty good.. But!! The
field on type text should be ALWAYS the LAST in the model of the table..
Otherwise, it will not work what happens in my case..

Good night!

Mike


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
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] Delete file

2001-07-10 Thread andRie Is

Hello php-db,

  How to delete file using PHP ?
  and how to set it's permission ?

 ,,,   
(@-@)   
+==---o00(_)00o-==+

It is better to be defeated on principle than to win on lies.
--Arthur Calwell
-- 
Best regards,
 andRie 


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

2001-07-10 Thread Kevin Johnson


http://www.php.net/manual/en/ref.filesystem.php


-Original Message-
From: andRie Is [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Delete file


Hello php-db,

  How to delete file using PHP ?
  and how to set it's permission ?

 ,,,   
(@-@)   
+==---o00(_)00o-==+

It is better to be defeated on principle than to win on lies.
--Arthur Calwell
-- 
Best regards,
 andRie 


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

2001-07-10 Thread Ken Sommers

Hello, pure HTML server question:

images like (backgroundimage.jpg) stored on server at: /htdocs/www/img

util.showpic.html is stored at :   /htdocs/util/

How to use backgroundimage.jpg as background in util.showpic.html  ?


body background=/www/img/backgroundimage.jpg 

does not work..
what if anything will work?

Thnaks 
Ken


-- 
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/interbase ibase_trans()

2001-07-10 Thread David Miles

The following sequence appears to hang the webpage...
...
   $dbht = ibase_trans($dbh);
... insert...
if($dbht) { ibase_commit($dbht); }

any thoughts to how to overcome this?

David Miles



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

2001-07-10 Thread Tom Peck

Is /htdocs/  your web root?  If it isn't the browser loading up the page 
would not have access to /www/img/backgroundimage.jpg.  If it is - try 
removing the space after the .jpg in your body tag.

Tom


At 15:51 10/07/2001 -0700, you wrote:
Hello, pure HTML server question:

images like (backgroundimage.jpg) stored on server at: /htdocs/www/img

util.showpic.html is stored at :   /htdocs/util/

How to use backgroundimage.jpg as background in util.showpic.html  ?


body background=/www/img/backgroundimage.jpg 

does not work..
what if anything will work?

Thnaks
Ken


--
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] Re: MySQL Database Locking - needed?

2001-07-10 Thread Tom Peck

Thanks for the reply Manual.

The updating IS done with one single query - but the problem is that if two 
people are editing the same car, the second update will overwrite the 
first.  Not a huge problem - and the chance of it happening is almost nil - 
but there is still the possibility..  Changing databases seems a little 
extreme - and not possible with our web host.

Tom



At 20:03 10/07/2001 -0300, you wrote:
Hello,

Tom Peck wrote:
 
  Hi
 
  The company I work for has recently developed a Car Dealer type site, which
  acts as a large on-line used car yard.  Currently the MySQL database
  holding the cars is added too / edited / deleted by one person employed for
  the job - but we hope to expand to allow the Dealers themselves admin
  rights to their on-line cars.
 
  I have begun development of a Dealer Admin area - but have a couple of
  questions regarding this:
 
  1)  Would any sort of Table Locking be needed for this -  for example if
  two people were trying to update the same car, at the same time etc etc..

No, if updating is done with a single query.


  2)  If yes, is there any on-line documentation on this?
  3)  What other problems could arise if this was implemented?

It depends on what you really want to do.

Anyway, MySQL has LOCK TABLES but I don't recommend to use them without
proper because you inadvertdly may leave the database locked. The latest
versions also support transactions. It's a bit awkward but it works,
although the recommendation is the same.

Maybe you want to try other databases that handle transactions more
efficiently like Oracle, or PostgreSQL if you can't afford a commercial
database.

If you are not sure about switching to other databases, you may want to
try Metabase which is a database abstraction package that lets you write
portable database applications. That way, you may switch (or not) to
another database later without changing your application code.

Metabase is free and is available here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Manuel Lemos

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

2001-07-10 Thread Ken Sommers

HI, thanks
not sure what the web root is.
first dir I see on FTP is  /  so is that the root?
and it contains a whole bunch of dirs including htdocs
htdocs contains dirs:  img (pics)   util (utility html pages)   www (main
html pages)

is there a way to refer to images in imgfrom html pages in  util AND www

I have things like  ../img/   not sure what that means.

thanks,
ken







- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


 Is /htdocs/  your web root?  If it isn't the browser loading up the page
 would not have access to /www/img/backgroundimage.jpg.  If it is - try
 removing the space after the .jpg in your body tag.

 Tom


 At 15:51 10/07/2001 -0700, you wrote:
 Hello, pure HTML server question:
 
 images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
 
 util.showpic.html is stored at :   /htdocs/util/
 
 How to use backgroundimage.jpg as background in util.showpic.html  ?
 
 
 body background=/www/img/backgroundimage.jpg 
 
 does not work..
 what if anything will work?
 
 Thnaks
 Ken
 
 
 --
 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]




Re: [PHP-DB] Re: MySQL Database Locking - needed?

2001-07-10 Thread Raquel Rice

Tom Peck wrote:
 
 Thanks for the reply Manual.
 
 The updating IS done with one single query - but the problem is that if two
 people are editing the same car, the second update will overwrite the
 first.  Not a huge problem - and the chance of it happening is almost nil -
 but there is still the possibility..  Changing databases seems a little
 extreme - and not possible with our web host.
 
 Tom

How about writing a text file that would be your lock file, rather
than depending upon MySQL to do it for you?

-- 
Raquel

He who has imagination without learning has wings and no feet.  
  --Anonymous

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

2001-07-10 Thread Tom Peck

when you load up your web page in your browser, what folder do you see?  It 
is most likely the contents of the www/ folder.

If this is the case, then all of your files which you want accessible to 
the web (ie html and images) need to be somewhere under this.  Try putting 
both the background image and the html file in the www folder, then change 
your body tag to:  body background=backgroundimage.jpg   then load up 
the page.

If that works fine, and you want the images in a different folder, create a 
dir (eg. img ) coming off the www/  folder, then put the background image 
in there, and change your body tag to:

body background=/img/backgroundimage.jpg
or
body background=img/backgroundimage.jpg

If your html file was in the img/ directory, and the image was in the www/ 
folder, so it looks like this:

/www/img/file.html
/www/backgroundimage.jpg

then your body tag could be:

body background=../backgroundimage.jpg

the ../ just traverses down a directory.

If none of this makes sense to you, you should probably do some basic html 
tutorials or something :-)


Tom





At 16:19 10/07/2001 -0700, you wrote:
HI, thanks
not sure what the web root is.
first dir I see on FTP is  /  so is that the root?
and it contains a whole bunch of dirs including htdocs
htdocs contains dirs:  img (pics)   util (utility html pages)   www (main
html pages)

is there a way to refer to images in imgfrom html pages in  util AND www

I have things like  ../img/   not sure what that means.

thanks,
ken







- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


  Is /htdocs/  your web root?  If it isn't the browser loading up the page
  would not have access to /www/img/backgroundimage.jpg.  If it is - try
  removing the space after the .jpg in your body tag.
 
  Tom
 
 
  At 15:51 10/07/2001 -0700, you wrote:
  Hello, pure HTML server question:
  
  images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
  
  util.showpic.html is stored at :   /htdocs/util/
  
  How to use backgroundimage.jpg as background in util.showpic.html  ?
  
  
  body background=/www/img/backgroundimage.jpg 
  
  does not work..
  what if anything will work?
  
  Thnaks
  Ken
  
  
  --
  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 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 question

2001-07-10 Thread Ken Sommers

I Looked up the root..sorry
 it is DOCUMENT_ROOT ..  /htdocs/www
so I guess browsers think they are starting out at /htdocs/www  and can't go
below to get anything?
so if I have phtml pages at /htdocs/util/ like
www.util.consumergrapevine.org/showdatabases.php and images at
/htdocs/www/img can I use an image in /htdocs/www/img  as sa background imge
in a page located in dir  /htdocs/util/  ??
if so,what would be the body tag look like?
body background=/img/backgroundimage.jpg   ?
or should I move my /img/ dir somewhere else like maybe throw 'em in with
all the pages in /htdocs/www
?

thanks again,

Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


 Is /htdocs/  your web root?  If it isn't the browser loading up the page
 would not have access to /www/img/backgroundimage.jpg.  If it is - try
 removing the space after the .jpg in your body tag look like?
body background=/www/img/backgroundimage.jpg

 Tom


 At 15:51 10/07/2001 -0700, you wrote:
 Hello, pure HTML server question:
 
 images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
 
 util.showpic.html is stored at :   /htdocs/util/
 
 How to use backgroundimage.jpg as background in util.showpic.html  ?
 
 
 body background=/www/img/backgroundimage.jpg 
 
 does not work..
 what if anything will work?
 
 Thnaks
 Ken
 
 
 --
 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]




Re: [PHP-DB] Re: MySQL Database Locking - needed?

2001-07-10 Thread Tom Peck

So what you mean is:

If someone clicks on a car to edit, a txt file is written (maybe called the 
carID.txt).  Then if someone else clicks on that car to edit it, it says 
that it is already being edited by someone else because the txt file 
exists?  So what happens if that person who clicked first closes his 
browser before updating the car?  How can that text file be automatically 
erased?

I think I'll just assume that this wont be a problem, and if someone 
overwrites someone elses edit then too bad.. :-)

Tom


At 16:30 10/07/2001 -0700, you wrote:
Tom Peck wrote:
 
  Thanks for the reply Manual.
 
  The updating IS done with one single query - but the problem is that if two
  people are editing the same car, the second update will overwrite the
  first.  Not a huge problem - and the chance of it happening is almost nil -
  but there is still the possibility..  Changing databases seems a little
  extreme - and not possible with our web host.
 
  Tom

How about writing a text file that would be your lock file, rather
than depending upon MySQL to do it for you?

--
Raquel

He who has imagination without learning has wings and no feet.
   --Anonymous


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

2001-07-10 Thread Tom Peck

The php file placed in your /util/ directory will not be accessible by the 
web..  everything you want accessible to the web has to be placed in the 
/www/  folder..  so place the php file in the /www/ folder (or /www/util/ 
if you like) and the images in the /www/img/ folder, and use the body tag:

body background=img/backgroundimage.jpg  (for /www/)
or
body background=/img/backgroundimage.jpg  (for /www/ and /www/util/)
or
body background=../img/backgroundimage.jpg  (for /www/util/)

Tom



At 16:38 10/07/2001 -0700, you wrote:
I Looked up the root..sorry
  it is DOCUMENT_ROOT ..  /htdocs/www
so I guess browsers think they are starting out at /htdocs/www  and can't go
below to get anything?
so if I have phtml pages at /htdocs/util/ like
www.util.consumergrapevine.org/showdatabases.php and images at
/htdocs/www/img can I use an image in /htdocs/www/img  as sa background imge
in a page located in dir  /htdocs/util/  ??
if so,what would be the body tag look like?
body background=/img/backgroundimage.jpg   ?
or should I move my /img/ dir somewhere else like maybe throw 'em in with
all the pages in /htdocs/www
?

thanks again,

Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


  Is /htdocs/  your web root?  If it isn't the browser loading up the page
  would not have access to /www/img/backgroundimage.jpg.  If it is - try
  removing the space after the .jpg in your body tag look like?
 body background=/www/img/backgroundimage.jpg
 
  Tom
 
 
  At 15:51 10/07/2001 -0700, you wrote:
  Hello, pure HTML server question:
  
  images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
  
  util.showpic.html is stored at :   /htdocs/util/
  
  How to use backgroundimage.jpg as background in util.showpic.html  ?
  
  
  body background=/www/img/backgroundimage.jpg 
  
  does not work..
  what if anything will work?
  
  Thnaks
  Ken
  
  
  --
  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 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 question

2001-07-10 Thread Nick O'Reilly

to get to the img directory you need to go up one directory ( ../ ) and 
then into the img directory
body background=../img/backgroundimage.jpg
 hope that helps
 nick

At 04:38  10/07/01 -0700, Ken Sommers wrote:
I Looked up the root..sorry
  it is DOCUMENT_ROOT ..  /htdocs/www
so I guess browsers think they are starting out at /htdocs/www  and can't go
below to get anything?
so if I have phtml pages at /htdocs/util/ like
www.util.consumergrapevine.org/showdatabases.php and images at
/htdocs/www/img can I use an image in /htdocs/www/img  as sa background imge
in a page located in dir  /htdocs/util/  ??
if so,what would be the body tag look like?
body background=/img/backgroundimage.jpg   ?
or should I move my /img/ dir somewhere else like maybe throw 'em in with
all the pages in /htdocs/www
?

thanks again,

Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


  Is /htdocs/  your web root?  If it isn't the browser loading up the page
  would not have access to /www/img/backgroundimage.jpg.  If it is - try
  removing the space after the .jpg in your body tag look like?
 body background=/www/img/backgroundimage.jpg
 
  Tom
 
 
  At 15:51 10/07/2001 -0700, you wrote:
  Hello, pure HTML server question:
  
  images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
  
  util.showpic.html is stored at :   /htdocs/util/
  
  How to use backgroundimage.jpg as background in util.showpic.html  ?
  
  
  body background=/www/img/backgroundimage.jpg 
  
  does not work..
  what if anything will work?
  
  Thnaks
  Ken
  
  
  --
  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]

Also the attempt to make PHP the egg-laying woolly milch sow is not my 
opinion after the actual target for PHP.
 --Zeev Suraski ( bablefish)



-- 
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] Sub domain image referencing

2001-07-10 Thread Ken Sommers

Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
www.util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i could move
them, and fix all references to them) but I like them there because I can
refer to images in pages in /www/ with background=img/bgpic.jpg...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages too,,and
of course
I don't want to have another dir with the same pics in them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make another sub
domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where should I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



-- 
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: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers

Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
http://util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i could move
them, and fix all references to them) but I like them there because I can
refer to images in pages in /www/ with background=img/bgpic.jpg...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages too,,and
of course
I don't want to have another dir with the same pics in them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make another sub
domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where should I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



-- 
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] RE: trash last message ,this ones right I think

2001-07-10 Thread Tom Peck

The problem is that they are completely different websites, from the web 
browser point of view - even though they are so close to each other on the 
server...  You should have mentioned this was a sub domain site :-)

If you REALLY don't want to copy the image from the www folder to the util 
folder, then you have to use:

body background=http://www.consumergrapevine.org/img/background.jpg;

So that the browser can reach the image file.

Tom



At 17:30 10/07/2001 -0700, you wrote:
Hello again,
  DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
http://util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i could move
them, and fix all references to them) but I like them there because I can
refer to images in pages in /www/ with background=img/bgpic.jpg...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages too,,and
of course
I don't want to have another dir with the same pics in them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make another sub
domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where should I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



--
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] RE: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers

Thanks Tom
 and sorry I didn't mention it properly at first,,
I was trying to analyse the problem.
is it becuz the first part of the referenece being the   ../
in body background=../www/img/background.jpg
the ../  wants to take the browser into illegal territory above the root?
because we are starting from /htdocs/util  so the  ../  would try to go back
to /htdocs

which is above the root (/htdocs/www) illegal territory.
just tryin to understand it

thanks ,
Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 5:50 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


 The problem is that they are completely different websites, from the web
 browser point of view - even though they are so close to each other on the
 server...  You should have mentioned this was a sub domain site :-)

 If you REALLY don't want to copy the image from the www folder to the util
 folder, then you have to use:

 body background=http://www.consumergrapevine.org/img/background.jpg;

 So that the browser can reach the image file.

 Tom



 At 17:30 10/07/2001 -0700, you wrote:
 Hello again,
   DOCUMENT_ROOT is..  /htdocs/www
 I  have a php file ( showdatabases.php) in my subdomain area
/htdocs/util/
 it loads up just fine: and if you click it, you will see my database
 structure if you like..:)
 http://util.consumergrapevine.org/showdatabases.php
 I have images stored in  /hdocs/www/img/  right now  (of course i could
move
 them, and fix all references to them) but I like them there because I can
 refer to images in pages in /www/ with background=img/bgpic.jpg
...of
 course this works just fine becuz /img/ is just down from /www/.
 but now I have pages in subdomains as menitoned above like:
 /htdocs/util/showdatabases.php
 and of course I want to refer to images from those subdomain pages
too,,and
 of course
 I don't want to have another dir with the same pics in them..something
 like...  /htdocs/util/img/
 becuz I already have the pics in /htdocs/www/img/  and if I make another
sub
 domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
 into /htdocs/stuff/img
 right? So,,, (yes I may be getting to the end now..) how or where should
I
 put my pics so the /www/ and /util/ and /stuff/ guys can use them as
 background pics?
 
 what would the body tag look like?
 body background=../www/img/background.jpg   doesn;t work
 what will?
 body background=What??
 thanks again,
 
 Ken
 
 
 
 --
 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]




Re: [PHP-DB] RE: trash last message ,this ones right I think

2001-07-10 Thread Tom Peck

Yes that is correct.

Your main site root is: /htdocs/www/
And your sub site (util) root is /htdocs/util/

These are two different sites from the browser's point of view.

Neither site will have access to anything below the root folder (from the 
browser).

Tom

At 18:02 10/07/2001 -0700, you wrote:
Thanks Tom
  and sorry I didn't mention it properly at first,,
I was trying to analyse the problem.
is it becuz the first part of the referenece being the   ../
in body background=../www/img/background.jpg
the ../  wants to take the browser into illegal territory above the root?
because we are starting from /htdocs/util  so the  ../  would try to go back
to /htdocs

which is above the root (/htdocs/www) illegal territory.
just tryin to understand it

thanks ,
Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 5:50 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


  The problem is that they are completely different websites, from the web
  browser point of view - even though they are so close to each other on the
  server...  You should have mentioned this was a sub domain site :-)
 
  If you REALLY don't want to copy the image from the www folder to the util
  folder, then you have to use:
 
  body background=http://www.consumergrapevine.org/img/background.jpg;
 
  So that the browser can reach the image file.
 
  Tom
 
 
 
  At 17:30 10/07/2001 -0700, you wrote:
  Hello again,
DOCUMENT_ROOT is..  /htdocs/www
  I  have a php file ( showdatabases.php) in my subdomain area
/htdocs/util/
  it loads up just fine: and if you click it, you will see my database
  structure if you like..:)
  http://util.consumergrapevine.org/showdatabases.php
  I have images stored in  /hdocs/www/img/  right now  (of course i could
move
  them, and fix all references to them) but I like them there because I can
  refer to images in pages in /www/ with background=img/bgpic.jpg
...of
  course this works just fine becuz /img/ is just down from /www/.
  but now I have pages in subdomains as menitoned above like:
  /htdocs/util/showdatabases.php
  and of course I want to refer to images from those subdomain pages
too,,and
  of course
  I don't want to have another dir with the same pics in them..something
  like...  /htdocs/util/img/
  becuz I already have the pics in /htdocs/www/img/  and if I make another
sub
  domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
  into /htdocs/stuff/img
  right? So,,, (yes I may be getting to the end now..) how or where should
I
  put my pics so the /www/ and /util/ and /stuff/ guys can use them as
  background pics?
  
  what would the body tag look like?
  body background=../www/img/background.jpg   doesn;t work
  what will?
  body background=What??
  thanks again,
  
  Ken
  
  
  
  --
  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]




Re: [PHP-DB] RE: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers


Thanks again,
why couldn't the main root be /htdocs/
?
ken
- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: Ken Sommers [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 6:05 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


 Yes that is correct.

 Your main site root is: /htdocs/www/
 And your sub site (util) root is /htdocs/util/

 These are two different sites from the browser's point of view.

 Neither site will have access to anything below the root folder (from the
 browser).

 Tom

 At 18:02 10/07/2001 -0700, you wrote:
 Thanks Tom
   and sorry I didn't mention it properly at first,,
 I was trying to analyse the problem.
 is it becuz the first part of the referenece being the   ../
 in body background=../www/img/background.jpg
 the ../  wants to take the browser into illegal territory above the root?
 because we are starting from /htdocs/util  so the  ../  would try to go
back
 to /htdocs
 
 which is above the root (/htdocs/www) illegal territory.
 just tryin to understand it
 
 thanks ,
 Ken
 
 - Original Message -
 From: Tom Peck [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 5:50 PM
 Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think
 
 
   The problem is that they are completely different websites, from the
web
   browser point of view - even though they are so close to each other on
the
   server...  You should have mentioned this was a sub domain site :-)
  
   If you REALLY don't want to copy the image from the www folder to the
util
   folder, then you have to use:
  
   body
background=http://www.consumergrapevine.org/img/background.jpg;
  
   So that the browser can reach the image file.
  
   Tom
  
  
  
   At 17:30 10/07/2001 -0700, you wrote:
   Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
   I  have a php file ( showdatabases.php) in my subdomain area
 /htdocs/util/
   it loads up just fine: and if you click it, you will see my database
   structure if you like..:)
   http://util.consumergrapevine.org/showdatabases.php
   I have images stored in  /hdocs/www/img/  right now  (of course i
could
 move
   them, and fix all references to them) but I like them there because I
can
   refer to images in pages in /www/ with background=img/bgpic.jpg
 ...of
   course this works just fine becuz /img/ is just down from /www/.
   but now I have pages in subdomains as menitoned above like:
   /htdocs/util/showdatabases.php
   and of course I want to refer to images from those subdomain pages
 too,,and
   of course
   I don't want to have another dir with the same pics in
them..something
   like...  /htdocs/util/img/
   becuz I already have the pics in /htdocs/www/img/  and if I make
another
 sub
   domain called /htdocs/stuff , I don't want to have to copy the pics
AGAIN
   into /htdocs/stuff/img
   right? So,,, (yes I may be getting to the end now..) how or where
should
 I
   put my pics so the /www/ and /util/ and /stuff/ guys can use them as
   background pics?
   
   what would the body tag look like?
   body background=../www/img/background.jpg   doesn;t work
   what will?
   body background=What??
   thanks again,
   
   Ken
   
   
   
   --
   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] Re: trash last message ,this ones right I think

2001-07-10 Thread Tom Henry


Perhaps you could consider using the webserver config (in Apache it 
would be the httpd.conf file) to do the dirty work.

Create and alias (in the /util/ domain) for img  that points to the 
/hdocs/www/img/ location - voila!  YMMV

HTH
Tom Henry



Ken Sommers wrote:

 Hello again,
  DOCUMENT_ROOT is..  /htdocs/www
 I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
 it loads up just fine: and if you click it, you will see my database
 structure if you like..:)
 http://util.consumergrapevine.org/showdatabases.php
 I have images stored in  /hdocs/www/img/  right now  (of course i could move
 them, and fix all references to them) but I like them there because I can
 refer to images in pages in /www/ with background=img/bgpic.jpg...of
 course this works just fine becuz /img/ is just down from /www/.
 but now I have pages in subdomains as menitoned above like:
 /htdocs/util/showdatabases.php
 and of course I want to refer to images from those subdomain pages too,,and
 of course
 I don't want to have another dir with the same pics in them..something
 like...  /htdocs/util/img/
 becuz I already have the pics in /htdocs/www/img/  and if I make another sub
 domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
 into /htdocs/stuff/img
 right? So,,, (yes I may be getting to the end now..) how or where should I
 put my pics so the /www/ and /util/ and /stuff/ guys can use them as
 background pics?
 
 what would the body tag look like?
 body background=../www/img/background.jpg   doesn;t work
 what will?
 body background=What??
 thanks again,
 
 Ken
 
 
 



-- 
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] RE: trash last message ,this ones right I think

2001-07-10 Thread Tom Peck

Ken

If the util site is going to be part of the main site, why don't you put it 
in the www folder?  ie.  /htdocs/www/util/  the idea for different site 
roots is so that you can keep different sites separate.

If you had the root as /htdocs/  for all, then the website address would 
be:  http://www.yourdomain.com/www/index.php  or wat eva..  not very nice..

Tom



At 18:26 10/07/2001 -0700, you wrote:

Thanks again,
why couldn't the main root be /htdocs/
?
ken
- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: Ken Sommers [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 6:05 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


  Yes that is correct.
 
  Your main site root is: /htdocs/www/
  And your sub site (util) root is /htdocs/util/
 
  These are two different sites from the browser's point of view.
 
  Neither site will have access to anything below the root folder (from the
  browser).
 
  Tom
 
  At 18:02 10/07/2001 -0700, you wrote:
  Thanks Tom
and sorry I didn't mention it properly at first,,
  I was trying to analyse the problem.
  is it becuz the first part of the referenece being the   ../
  in body background=../www/img/background.jpg
  the ../  wants to take the browser into illegal territory above the root?
  because we are starting from /htdocs/util  so the  ../  would try to go
back
  to /htdocs
  
  which is above the root (/htdocs/www) illegal territory.
  just tryin to understand it
  
  thanks ,
  Ken
  
  - Original Message -
  From: Tom Peck [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 10, 2001 5:50 PM
  Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think
  
  
The problem is that they are completely different websites, from the
web
browser point of view - even though they are so close to each other on
the
server...  You should have mentioned this was a sub domain site :-)
   
If you REALLY don't want to copy the image from the www folder to the
util
folder, then you have to use:
   
body
background=http://www.consumergrapevine.org/img/background.jpg;
   
So that the browser can reach the image file.
   
Tom
   
   
   
At 17:30 10/07/2001 -0700, you wrote:
Hello again,
  DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area
  /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
http://util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i
could
  move
them, and fix all references to them) but I like them there because I
can
refer to images in pages in /www/ with background=img/bgpic.jpg
  ...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages
  too,,and
of course
I don't want to have another dir with the same pics in
them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make
another
  sub
domain called /htdocs/stuff , I don't want to have to copy the pics
AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where
should
  I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



--
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 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] LOAD DATA LOCAL ERROR

2001-07-10 Thread William

Every time I use the command 

LOAD DATA LOCAL INFILE C:WINDOWS:Desktop:db.txt INTO TABLE booktest;  

I get this error message...

ERROR:
File 'C:WINDOWS:Desktop:db.txt' not found (Errcode: 2)  
 

How can I load my  file to the database???

--Will



Re: [PHP-DB] LOAD DATA LOCAL ERROR

2001-07-10 Thread Tom Peck

I may be not understanding properly without checking your MySQL syntax, but 
should it not be C:\WINDOWS\Desktop\db.txt?

Tom


At 08:53 10/07/2001 -0500, you wrote:
Every time I use the command

LOAD DATA LOCAL INFILE C:WINDOWS:Desktop:db.txt INTO TABLE booktest;

I get this error message...

ERROR:
File 'C:WINDOWS:Desktop:db.txt' not found (Errcode: 2)


How can I load my  file to the database???

--Will


-- 
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] Fw: Referential Integrity

2001-07-10 Thread Ken Sommers


- Original Message -
From: Ken Sommers [EMAIL PROTECTED]
To: pak [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 10:29 PM
Subject: Re: Referential Integrity


 Ever play .,.Name that Code?

 I can delete those related rows in those 50 tables in about 5 lines..
 but first you gotta keep a table with the names of the 50 related tables
and
 the name of the foreign key in the row.

 then just loop around 50 times{
 get next table name and foreign key name form related_tables table
 Delete from related_table Where foreign_key = primary_key;
 }

 might work...!

 Ken

 - Original Message -
 From: pak [EMAIL PROTECTED]
 To: Ken Sommers [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 9:40 PM
 Subject: Re: Referential Integrity


  Ken,
  These are trivial examples. What if the Administrator changes the
 Employee's
  ID if the ID is not a pure numerical one and not a computer generated ?
 eg.
  IT001 represents employee in IT department. HR001 represents in Human
  Resources department.
  The point is the basic principle in database design : referential
 integrity
  gaurantee the master-detail relationship be maintained without data
loss.
  And this is the important function provided by DBMS.
  If we have a ER diagram when do the normalization, then we can see the
  tables invloved. How about if there are 200 tables in the database, and
50
  tables invloved, how many lines of code we have to write to do the
update
 in
  our program developed by ,say VB, VC++, Delphi.
 
  - Original Message -
  From: Ken Sommers [EMAIL PROTECTED]
  To: pak [EMAIL PROTECTED]
  Sent: Wednesday, July 11, 2001 2:26 PM
  Subject: Re: Referential Integrity
 
 
  | Thanks for nice example,
  | Question,,Why would you ever have to change these codes
  | [EmpID or SuburbCode]?, if they are meaningless, arbitrary, probably
  | computer-generated numbers that should have no intrinsic or any other
  | meaning of their own?,,Isn't; one meaningless number as good as the
 next?
  | ..
  | ken
  | - Original Message -
  | From: pak [EMAIL PROTECTED]
  | To: Ken Sommers [EMAIL PROTECTED]
  | Sent: Tuesday, July 10, 2001 9:08 PM
  | Subject: Re: Referential Integrity
  |
  |
  |  1)Table Employee
  |  EmpID
  |  Name
  |  Address
  |  Phone
  |  SuburbCode (reference table Suburb)
  | 
  |  2)Table Manager
  |  ManID (reference Employee)
  |  SubordinateID (reference table Employee)
  | 
  |  3)Table Suburb
  |  SuburbCode
  |  Suburb
  |  State
  |  Postcode
  | 
  |  If the user/Administrator of the application/database change the
  | SuburbCode
  |  for a particular Suburb,
  |  he needs to change the table Employee also for every record with
same
  |  SuburbCode.
  | 
  |  If the application allows the user/clerk changes the SuburbCode, my
  |  application needs to change the detail
  |  table (Employee).
  | 
  |  This is the same case as if any changes of EmpID in table Employee,
  | changes
  |  also need in table Manager explicitly.
  |  MySQL does not do that itself.
  | 
  | 
  |  - Original Message -
  |  From: Ken Sommers [EMAIL PROTECTED]
  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  Sent: Wednesday, July 11, 2001 1:44 PM
  |  Subject: Re: Referential Integrity
  | 
  | 
  |  | Please give some examples where you would need the dbms to do the
  |  | referential integrity?
  |  | Ken
  |  | - Original Message -
  |  | From: pak [EMAIL PROTECTED]
  |  | To: Ken Sommers [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  |  | Sent: Tuesday, July 10, 2001 8:31 PM
  |  | Subject: Re: Referential Integrity
  |  |
  |  |
  |  |  So is MySQL not suitable for large corporate database ?
  |  |  - Original Message -
  |  |  From: Ken Sommers [EMAIL PROTECTED]
  |  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  |  Sent: Wednesday, July 11, 2001 1:24 PM
  |  |  Subject: Re: Referential Integrity
  |  | 
  |  | 
  |  |  | hello,
  |  |  | Do simple input validation.
  |  |  |
  |  |  | If the user is entering what is supposed to be a primary key
  value,
  |  |  | make sure it is a valid key before sticking it in any where,
If
  it's
  | a
  |  |  bogus
  |  |  | key .tell the user to try again.
  |  |  |
  |  |  | If user wants you to delete rows from a  primary table
  | (customer)that
  |  | have
  |  |  | foreign keys( cust ID in Orders)that are still pointing to
  |  |  | something.(related table)..tell the user that this customer
 still
  | has
  |  |  | orders( yes you'll have to check yourself),,and deleting all
 those
  |  | orders
  |  |  | would make the accountants and IRS really mad. and you can;t
  delete
  |  the
  |  |  | customer without deleting all the orders,,and tell them
further
  more
  |  |  ,,that
  |  |  | deleting primary keys is bad practice anyway..should just set
 the
  |  active
  |  |  | flag to NO..cuz you still want all the history involved with
  that
  |  |  customer
  |  |  | around.. and further more,..IF a few years down the line that
  | customer
  |  

[PHP-DB] Fw: Referential Integrity

2001-07-10 Thread Ken Sommers


- Original Message -
From: Ken Sommers [EMAIL PROTECTED]
To: pak [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 10:46 PM
Subject: Re: Referential Integrity


 I started learning PHP Mysql about 2 weeks ago.
 I'm still reading the tutorials.
 Hopefuly some experienced programmers in PHP mysql will share how they
 cascade their updates when they change a primary key.

 But my guess is If you keep a table of related table names /foreign key
 names,,related to the table that needs to have it's updates cascaded,,you
 can code it in a few lines; maybe 5 or 10 lines  in PHP using mysql
 functions.
 I would love to see some real world examples.

 Ken

 - Original Message -
 From: pak [EMAIL PROTECTED]
 To: Ken Sommers [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 10:32 PM
 Subject: Re: Referential Integrity


  Ken,
  What I am doing is programmatically to cascade update the detail/related
  tables, that is the way.
  Every body know Oracle handles great in database operation, that is
 another
  story.
  I am asking for help, as I am not familiar with MySQL, is there other
way
 to
  do the update cascade besides doing so in application programming
  statements.
  - Original Message -
  From: Ken Sommers [EMAIL PROTECTED]
  To: pak [EMAIL PROTECTED]
  Sent: Wednesday, July 11, 2001 3:09 PM
  Subject: Re: Referential Integrity
 
 
  | OK agreed, if the primary keys have any human value which might need
  | changing,,then i recommend Oracle ..:)
  | IF the Employee ID has the department embedded in it( bad design
  | imho),,,then I recommend a dbms with Ref Integrety built in.
  | But if you have a system with all primary keys as computer-generated
  | meaningless values,
  | I can't; see a reason to ever have to change one of those keys.
  |
  | Then what about deleting primary-keyed rows that point to other
tables?
  | Maybe 50 other tables? hmmm it may be time for Oracle,,got any money?
  |
  | Ken
  |
  |
  |
  | - Original Message -
  | From: pak [EMAIL PROTECTED]
  | To: Ken Sommers [EMAIL PROTECTED]
  | Sent: Tuesday, July 10, 2001 9:40 PM
  | Subject: Re: Referential Integrity
  |
  |
  |  Ken,
  |  These are trivial examples. What if the Administrator changes the
  | Employee's
  |  ID if the ID is not a pure numerical one and not a computer
generated
 ?
  | eg.
  |  IT001 represents employee in IT department. HR001 represents in
Human
  |  Resources department.
  |  The point is the basic principle in database design : referential
  | integrity
  |  gaurantee the master-detail relationship be maintained without data
  loss.
  |  And this is the important function provided by DBMS.
  |  If we have a ER diagram when do the normalization, then we can see
the
  |  tables invloved. How about if there are 200 tables in the database,
 and
  50
  |  tables invloved, how many lines of code we have to write to do the
  update
  | in
  |  our program developed by ,say VB, VC++, Delphi.
  | 
  |  - Original Message -
  |  From: Ken Sommers [EMAIL PROTECTED]
  |  To: pak [EMAIL PROTECTED]
  |  Sent: Wednesday, July 11, 2001 2:26 PM
  |  Subject: Re: Referential Integrity
  | 
  | 
  |  | Thanks for nice example,
  |  | Question,,Why would you ever have to change these codes
  |  | [EmpID or SuburbCode]?, if they are meaningless, arbitrary,
probably
  |  | computer-generated numbers that should have no intrinsic or any
 other
  |  | meaning of their own?,,Isn't; one meaningless number as good as
the
  | next?
  |  | ..
  |  | ken
  |  | - Original Message -
  |  | From: pak [EMAIL PROTECTED]
  |  | To: Ken Sommers [EMAIL PROTECTED]
  |  | Sent: Tuesday, July 10, 2001 9:08 PM
  |  | Subject: Re: Referential Integrity
  |  |
  |  |
  |  |  1)Table Employee
  |  |  EmpID
  |  |  Name
  |  |  Address
  |  |  Phone
  |  |  SuburbCode (reference table Suburb)
  |  | 
  |  |  2)Table Manager
  |  |  ManID (reference Employee)
  |  |  SubordinateID (reference table Employee)
  |  | 
  |  |  3)Table Suburb
  |  |  SuburbCode
  |  |  Suburb
  |  |  State
  |  |  Postcode
  |  | 
  |  |  If the user/Administrator of the application/database change the
  |  | SuburbCode
  |  |  for a particular Suburb,
  |  |  he needs to change the table Employee also for every record with
  same
  |  |  SuburbCode.
  |  | 
  |  |  If the application allows the user/clerk changes the SuburbCode,
 my
  |  |  application needs to change the detail
  |  |  table (Employee).
  |  | 
  |  |  This is the same case as if any changes of EmpID in table
 Employee,
  |  | changes
  |  |  also need in table Manager explicitly.
  |  |  MySQL does not do that itself.
  |  | 
  |  | 
  |  |  - Original Message -
  |  |  From: Ken Sommers [EMAIL PROTECTED]
  |  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  |  Sent: Wednesday, July 11, 2001 1:44 PM
  |  |  Subject: Re: Referential Integrity
  |  | 
  |  | 
  |  |  | Please give some examples where you would need the dbms to do
 the
  |  |  |