RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
Not exactly sure what I did here.  
there are 5 skill textfields name skill[]
then the years sky[]
then the last used slu[]

I was following the format of my other arrays, so
stored them list this:

if ( empty( $_SESSION['l_skill'] ) ) {
$_SESSION['l_skill']=array();
}

if ( is_array( $_REQUEST['skill'] ) ) {
$_SESSION['l_skill'] = array_unique(
array_merge( $_SESSION['l_skill'],
 $_REQUEST['skill'] )
);
}
if ( empty( $_SESSION['l_years'] ) ) {
$_SESSION['l_years']=array();
}

if ( is_array( $_REQUEST['sky'] ) ) {
$_SESSION['l_years'] = array_unique(
array_merge( $_SESSION['l_years'],
 $_REQUEST['sky'] )
);
}
if ( empty( $_SESSION['l_lastu'] ) ) {
$_SESSION['l_lastu']=array();
}

if ( is_array( $_REQUEST['slu'] ) ) {
$_SESSION['l_lastu'] = array_unique(
array_merge( $_SESSION['l_lastu'],
 $_REQUEST['slu'] )
);
}

I think that is all fine, but I think at the critical
moment (setup for database transaction is where my
problem is and it's probably slight)Read past the code
for my explanation.


if ( is_array( $_SESSION['l_skill'] ) ) {
foreach ( $_SESSION['l_skill'] as $s ) {
}
}
if ( is_array( $_SESSION['l_years'] ) ) {
foreach ( $_SESSION['l_years'] as $x ) {
}
}
if ( is_array( $_SESSION['l_lastu'] ) ) {
foreach ( $_SESSION['l_lastu'] 
as $z ) {
}
}

$query = "INSERT INTO .)
VALUES ($, '$s', $x, $z)";

At first I thought to nest all the "if ( is_array"
but that produced some funky loop.
So then I formatted as aboved.  Problem is all i'm
getting is the last element from each array into the
database.  
I'm thinking then, perhaps not nested , but the if is
arrays need to be formatted differently.

Stuart




--- Graham Cossey <[EMAIL PROTECTED]> wrote:

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



Re: [PHP-DB] MySQL max records

2004-10-17 Thread ApexEleven
thanks a lot, that's just about what i needed to hear


On Sat, 16 Oct 2004 11:00:25 -0400, Bastien Koert <[EMAIL PROTECTED]> wrote:
> Have a look at some of the case studies at mysql.comthere are servers
> handling 50Million records with not problemsat a certain point it
> becomes more a hardware issue than a db server issue...
> 
> bastien
> 
> >From: -{ Rene Brehmer }- <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: [PHP-DB] MySQL max records
> >Date: Sat, 16 Oct 2004 02:01:07 +0200
> 
> 
> >
> >How many records it can hold before becoming too slow for practical use
> >depends entirely of the hardware that makes up the server.
> >
> >Current versions of MySQL has a finite limit of 2^64 records per table, but
> >how many billion records you can shove into it before you start seeing
> >performance issues depends on the RAM size, the RAM/CPU roundtrip speed,
> >and the pure processing power of the CPUs, as well as the overall load of
> >the server. Obviously dedicated DB servers/clusters will be able to handle
> >alot higher record counts than mixed-purpose servers.
> >
> >
> >Rene
> >
> >At 01:32 16-10-2004, ApexEleven wrote:
> >>I tried a little research on the mysql list but didn't find what I was
> >>looking for.What is the limit of a MySQL database? How many hundreds
> >>of thousands of records can a database hold before it gets too
> >>sluggish to work on a production server?
> >>
> >>thanks,
> >
> >--
> >Rene Brehmer
> >aka Metalbunny
> >
> >If your life was a dream, would you wake up from a nightmare, dripping of
> >sweat, hoping it was over? Or would you wake up happy and pleased, ready to
> >take on the day with a smile?
> >
> >http://metalbunny.net/
> >References, tools, and other useful stuff...
> >Check out the new Metalbunny forums at http://forums.metalbunny.net/
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
<<
Jasper Howard - Database Administration
ApexEleven.com
530 559 0107
--->>

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



RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread H. J. Wils
Hi everybody,
For quite a while i'm struggeled with my session. It doesn't seem to work, 
can anyone help me?

This is my code:
page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
  echo "next page";
  echo "".session_id();
}
page 2:
session_start();
if (isset($_SESSION["test"]))
{
  echo $_SESSION["test"];
}else
{
  echo "No sessionvariable found..";
}
echo "".session_id()."";
On page two, there's always the 'no sessionvariable found...'-message, 
further the session id also changes... i dont understand what i am doing 
wrong...

_
Play online games with your friends with MSN Messenger 
http://messenger.msn.nl/

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


[PHP-DB] session

2004-10-17 Thread H. J. Wils
sorry, forgot to change the subject :), just to be sure here is my question 
again..

Hi everybody,
For quite a while i'm struggeled with my session. It doesn't seem to work, 
can anyone help me?

This is my code:
page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
 echo "next page";
 echo "".session_id();
}
page 2:
session_start();
if (isset($_SESSION["test"]))
{
 echo $_SESSION["test"];
}else
{
 echo "No sessionvariable found..";
}
echo "".session_id()."";
On page two, there's always the 'no sessionvariable found...'-message, 
further the session id also changes... i dont understand what i am doing 
wrong...

_
Play online games with your friends with MSN Messenger 
http://messenger.msn.nl/

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


Re: [PHP-DB] session

2004-10-17 Thread Brad Bonkoski
I believe you need to pass the session variable along to the next page...
Something like:
On page 1:
if session is set
{
   $s = SID;
   echo "Link";
}
- Original Message - 
From: "H. J. Wils" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 9:38 AM
Subject: [PHP-DB] session


sorry, forgot to change the subject :), just to be sure here is my 
question again..

Hi everybody,
For quite a while i'm struggeled with my session. It doesn't seem to work, 
can anyone help me?

This is my code:
page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
 echo "next page";
 echo "".session_id();
}
page 2:
session_start();
if (isset($_SESSION["test"]))
{
 echo $_SESSION["test"];
}else
{
 echo "No sessionvariable found..";
}
echo "".session_id()."";
On page two, there's always the 'no sessionvariable found...'-message, 
further the session id also changes... i dont understand what i am doing 
wrong...

_
Play online games with your friends with MSN Messenger 
http://messenger.msn.nl/

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


Re: [PHP-DB] session

2004-10-17 Thread H. J. Wils
hey thanx it works, but
why is that? i mean, session are there to save data which te user cant 
see... isnt there another way to pass the SID? i have the feeling passing 
the SID trhough the url-paramters is harming the security, am i right?

From: "Brad Bonkoski" <[EMAIL PROTECTED]>
To: "H. J. Wils" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: Re: [PHP-DB] session
Date: Sun, 17 Oct 2004 09:46:06 -0400
MIME-Version: 1.0
Received: from pb1.pair.com ([216.92.131.4]) by mc5-f14.hotmail.com with 
Microsoft SMTPSVC(5.0.2195.6824); Sun, 17 Oct 2004 06:47:55 -0700
Received: (qmail 35123 invoked by uid 1010); 17 Oct 2004 13:47:04 -
Received: (qmail 33188 invoked by uid 1010); 17 Oct 2004 13:46:19 -
X-Message-Info: JGTYoYF78jGDHqvDtc0+QckXsrFscNGe
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Virus-Scanned: Symantec AntiVirus Scan Engine
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 17 Oct 2004 13:47:55.0249 (UTC) 
FILETIME=[E77EF610:01C4B44F]

I believe you need to pass the session variable along to the next page...
Something like:
On page 1:
if session is set
{
   $s = SID;
   echo "Link";
}
- Original Message - From: "H. J. Wils" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 9:38 AM
Subject: [PHP-DB] session

sorry, forgot to change the subject :), just to be sure here is my question 
again..

Hi everybody,
For quite a while i'm struggeled with my session. It doesn't seem to work, 
can anyone help me?

This is my code:
page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
 echo "next page";
 echo "".session_id();
}
page 2:
session_start();
if (isset($_SESSION["test"]))
{
 echo $_SESSION["test"];
}else
{
 echo "No sessionvariable found..";
}
echo "".session_id()."";
On page two, there's always the 'no sessionvariable found...'-message, 
further the session id also changes... i dont understand what i am doing 
wrong...

_
Play online games with your friends with MSN Messenger 
http://messenger.msn.nl/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN Search, for accurate results! http://search.msn.nl
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] session

2004-10-17 Thread Brad Bonkoski
Look at the URL when you pass it?  It does not show anything, in fact the 
session is still using cookies or other means to tansfer the data.
You should also be able to sniff the data being passed by the URL and not 
see any of the session data.

- Original Message - 
From: "H. J. Wils" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 10:17 AM
Subject: Re: [PHP-DB] session


hey thanx it works, but
why is that? i mean, session are there to save data which te user cant 
see... isnt there another way to pass the SID? i have the feeling passing 
the SID trhough the url-paramters is harming the security, am i right?

From: "Brad Bonkoski" <[EMAIL PROTECTED]>
To: "H. J. Wils" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: Re: [PHP-DB] session
Date: Sun, 17 Oct 2004 09:46:06 -0400
MIME-Version: 1.0
Received: from pb1.pair.com ([216.92.131.4]) by mc5-f14.hotmail.com with 
Microsoft SMTPSVC(5.0.2195.6824); Sun, 17 Oct 2004 06:47:55 -0700
Received: (qmail 35123 invoked by uid 1010); 17 Oct 2004 13:47:04 -
Received: (qmail 33188 invoked by uid 1010); 17 Oct 2004 13:46:19 -
X-Message-Info: JGTYoYF78jGDHqvDtc0+QckXsrFscNGe
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Virus-Scanned: Symantec AntiVirus Scan Engine
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 17 Oct 2004 13:47:55.0249 (UTC) 
FILETIME=[E77EF610:01C4B44F]

I believe you need to pass the session variable along to the next page...
Something like:
On page 1:
if session is set
{
   $s = SID;
   echo "Link";
}
- Original Message - From: "H. J. Wils" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 9:38 AM
Subject: [PHP-DB] session

sorry, forgot to change the subject :), just to be sure here is my 
question again..

Hi everybody,
For quite a while i'm struggeled with my session. It doesn't seem to work, 
can anyone help me?

This is my code:
page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
 echo "next page";
 echo "".session_id();
}
page 2:
session_start();
if (isset($_SESSION["test"]))
{
 echo $_SESSION["test"];
}else
{
 echo "No sessionvariable found..";
}
echo "".session_id()."";
On page two, there's always the 'no sessionvariable found...'-message, 
further the session id also changes... i dont understand what i am doing 
wrong...

_
Play online games with your friends with MSN Messenger 
http://messenger.msn.nl/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN Search, for accurate results! http://search.msn.nl
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
Changed my direction somewhat but keep getting a parse
error and although I know where it is , I can't seem
to figure out what I need to do to make it syntax
correct:

This is how I am passing the arrays:

if ( empty( $_SESSION['l_skill'] ) ) {
$_SESSION['l_skill']=array();
}

if ( is_array( $_REQUEST['skill'] ) ) {
$_SESSION['l_skill'] = array_unique(
array_merge( $_SESSION['l_skill'],
 $_REQUEST['skill'] )
);
}

if ( empty( $_SESSION['l_sky'] ) ) {
$_SESSION['l_sky']=array();
}

if ( is_array( $_REQUEST['sky'] ) ) {
$_SESSION['l_sky'] = array_unique(
array_merge( $_SESSION['l_sky'],
 $_REQUEST['sky'] )
);
}

if ( empty( $_SESSION['l_slu'] ) ) {
$_SESSION['l_slu']=array();
}

if ( is_array( $_REQUEST['slu'] ) ) {
$_SESSION['l_slu'] = array_unique(
array_merge( $_SESSION['l_slu'],
 $_REQUEST['slu'] )
);
}

This is how I am trying to get them into the database:

$queries = array();
for($i=0; $i wrote:

>

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



RE: [PHP-DB] MySQL nested subqueries

2004-10-17 Thread Bastien Koert
4.1 is supposed to handle them, how well is another issue
bastien

From: Matthew Perry <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL nested subqueries
Date: Sat, 16 Oct 2004 18:30:56 -0500
Anyone know when there will be a version of MySQL that can handle nested 
subqueries?
-Matt

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


RE: [PHP-DB] PHP functions independant executions

2004-10-17 Thread Bastien Koert
you can execute scripts as cron jobs.  what is the OS?
Note that for cron jobs you should not have browser based output...any 
output, errors, etc should be sent to a file.

bastien

From: Matthew Perry <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP functions independant executions
Date: Sat, 16 Oct 2004 19:47:45 -0500
How do I get my PHP funcitons to execute independantly based on what time 
of day it is and not on the user?
This may not be how PHP was designed but I would like to do things like 
send out an email to someone based on suchandsuch criteria, backup DB on 
regular schedule etc.

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


[PHP-DB] unexplained delay between db connection and db write operations

2004-10-17 Thread keith brickey
A php script that creates tables exhibits a 3 minute delay when invoked over
the Internet that is not evidenced when invoked using the ISP account where
the server resides. A timer function records elapsed time for each operation
and reports the elapsed times at the end of the script.

The following elapsed times occured when the script was invoked over the
internet:

seconds to connect & select: 0.00050687789916992
dropped biodata table
seconds to make biodata table: 189.00175213814

These are the elapsed times when the script was invoked using the ISP where
the server resides:

seconds to connect & select: 0.00054097175598145
dropped biodata table
seconds to make biodata table: 0.0022339820861816

When invoked over the internet (using a provider other than the one that
hosts the web site) there is 189 seconds of additional delay
between making the dababase connection and creating the first table. The ISP
has other PHP customers who do no experience the problem.

I thought the delay may be caused by caching, so I added the following code
to the start of the script; however it makes no difference. Furthermore, the
delay is about he same regardless of which ISP the browser is using to
connect.



I will greatly appreciate any suggestions.

Thanks,

Keith

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



Re: [PHP-DB] INNO tables - will I have problems?

2004-10-17 Thread Antoine
On Wed, 13 Oct 2004 15:26:12 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> right, so after you define the fields of the table,  you add type=innodb
> simple as that
> 
> dave
> 
> 
> Gerard Samuel <[EMAIL PROTECTED]>
> 
> 10/13/2004 02:34 PM
> 
> To:
> [EMAIL PROTECTED]
> cc:
> [EMAIL PROTECTED], [EMAIL PROTECTED]
> 
> 
> Subject:
> Re: [PHP-DB] INNO tables - will I have problems?
> 
> [EMAIL PROTECTED] wrote:
> >>If the minimum requirement of mysql is version 4, then you
> >>will have no problems, as INNODB is the default type in mysql 4.x.x
> >>
> >>--
> >
> >
> > InnoDB is included by default in mysql 4 but the default is still MyISM.
> >
> 
> I looked over the manual, and I believe that you are correct.
> The default type is still MyISAM, but to create an INNODB table, one
> must specify it in the CREATE TABLE syntax...

You can convert very easily afterwards also. Just a matter of a couple
of lines of sql. You will have to add all the extra constraints and
functionality after too...
Cheers
Antoine
-- 
G System, The Evolving GUniverse - http://www.g-system.at

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



RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Graham Cossey
Stuart, what does your echo($query) line output?

I would hazard a guess that your quotes are wrong and you are not getting
what you expect.

What is &LUID?

I believe you will need to execute an INSERT query within each "for($i=0;
$i
> This is how I am trying to get them into the database:
>
> $queries = array();
> for($i=0; $i {
> $queries[] = "('" . $l_skill[$i] . "', " .
> $l_sky[$i] . ", " . $l_slu[$i] . ")";
> }
>
> if(count($queries) == 0)
> {
> # Nothing passed
> # exit
> }
>
> $query = "INSERT INTO LurkProfiles_Skicerts
> (ProfileID, SkilCerts, NumYear, Lused)
> VALUES ($LUID ". implode(", ", $queries);
>
> //Above line is where I am having the problem.  There
> is something between LUID and the implode statement.
> LUID is not passing into the insert generating a sql
> error.
>
>
> $result = mysql_query($query);
> echo $query;
>

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



RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Graham Cossey
Stuart, now I'm confused.

You seem to be posting slightly different versions of problems relating to
the same script(s) on 2 lists.

What is the current situation? Iterating through the 3 arrays or inserting
into MySQL?

Graham

> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 17 October 2004 16:14
> To: Stuart Felenstein; Graham Cossey; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Question: Putting separate form elements into an
> array
>
>
> Changed my direction somewhat but keep getting a parse
> error and although I know where it is , I can't seem
> to figure out what I need to do to make it syntax
> correct:
>
[snip]

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



RE: [PHP-DB] Question: Putting separate form elements into an array

2004-10-17 Thread Stuart Felenstein
Sorry about the two lists.  The echo's are fine.  The
problem was iterating through the 3 arrays.

Stuart
--- Graham Cossey <[EMAIL PROTECTED]> wrote:

> Stuart, now I'm confused.
> 
> You seem to be posting slightly different versions
> of problems relating to
> the same script(s) on 2 lists.
> 
> What is the current situation? Iterating through the
> 3 arrays or inserting
> into MySQL?
> 
> Graham
> 
> > -Original Message-
> > From: Stuart Felenstein
> [mailto:[EMAIL PROTECTED]
> > Sent: 17 October 2004 16:14
> > To: Stuart Felenstein; Graham Cossey;
> [EMAIL PROTECTED]
> > Subject: RE: [PHP-DB] Question: Putting separate
> form elements into an
> > array
> >
> >
> > Changed my direction somewhat but keep getting a
> parse
> > error and although I know where it is , I can't
> seem
> > to figure out what I need to do to make it syntax
> > correct:
> >
> [snip]
> 
> 
> 

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



RE: [PHP-DB] unexplained delay between db connection and db write operations

2004-10-17 Thread Bastien Koert
So you have local code executing against a remote server? And you have the 
proper accounts and authentication, and direct acccess to the machine?

Could this be an issue where users/aapilcations are still locking the old 
table before the drop command is issued? What is the current load on the 
machine? users/queries?

What happens if you change the name of the table to something else? Is there 
still the delay?

What mechanism are you using to connect? PHP or another scripting language? 
Java or other compiled language? Some remote system admin tool like 
'phpmyadmin' or 'mysqlcc'?

Bastien


From: "keith brickey" <[EMAIL PROTECTED]>
Reply-To: "keith brickey" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] unexplained delay between db connection and db write 
operations
Date: Sun, 17 Oct 2004 10:57:51 -0700

A php script that creates tables exhibits a 3 minute delay when invoked 
over
the Internet that is not evidenced when invoked using the ISP account where
the server resides. A timer function records elapsed time for each 
operation
and reports the elapsed times at the end of the script.

The following elapsed times occured when the script was invoked over the
internet:
seconds to connect & select: 0.00050687789916992
dropped biodata table
seconds to make biodata table: 189.00175213814
These are the elapsed times when the script was invoked using the ISP where
the server resides:
seconds to connect & select: 0.00054097175598145
dropped biodata table
seconds to make biodata table: 0.0022339820861816
When invoked over the internet (using a provider other than the one that
hosts the web site) there is 189 seconds of additional delay
between making the dababase connection and creating the first table. The 
ISP
has other PHP customers who do no experience the problem.

I thought the delay may be caused by caching, so I added the following code
to the start of the script; however it makes no difference. Furthermore, 
the
delay is about he same regardless of which ISP the browser is using to
connect.


I will greatly appreciate any suggestions.
Thanks,
Keith
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] backing up off of web host

2004-10-17 Thread Matthew Perry
The MySQL database on my web host has only non-sensitive information.
How bad an idea is it to have a backup copy emailed to me at a 
designated time so I don't have to depend on myself and the host for 
backups? 
I am worried this cheep web host will go out of business and take my 
backups with him.

The file will be rediculously huge  for email of course.
Is this the only problem?
What other solutions do I have that do not depend on my web host?
Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] CMS Translation Systen: DB Desiging

2004-10-17 Thread bruno b b magalhaes
Hi everone,

I am building a multilingual content management systen, and I am studying the best way
to have the content translated, with minimal Database queries and load.

So I have:

CONTENTS
contentId
contentCreationDate
contentModificationDate
translationId
contentStatus

CATEGORIES
categoryId
categoryParentId
categoryModulePath
translationId
categoryStatus

TRANSLATIONS
translationId
field01
field02
field03
field04
field05
field06
field07
field08
field09
field10
translationLanguage
translationStatus

So just run a simple join query:
SELECT contents.*,translations.* FROM contents,translations WHERE
contents.translationId=translations.translationId AND
translations.translationLanguage='en-uk' AND translations.translationStatus = 1

Or with categories:
SELECT categories.*,translations.* FROM categories,translations WHERE
categories.translationId=translations.translationId AND
translations.translationLanguage='en-uk' AND translations.translationStatus = 1 AND
categories.categoryModulePath='products'


Any better idea to handle that?

Regards,
Bruno B B Magalhaes

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



Re: [PHP-DB] backing up off of web host

2004-10-17 Thread lists
Matthew Perry wrote:
The MySQL database on my web host has only non-sensitive information.
How bad an idea is it to have a backup copy emailed to me at a 
designated time so I don't have to depend on myself and the host for 
backups? 
To qunatify how "bad of an idea" depends on how valuable your data is. 
If you say it's non-sensitive, then you shouldn't have anything to worry 
about.  If your database contains credit card info, then that would be a 
security concern if sent via e-mail unencrypted.

Is this the only problem?
What other solutions do I have that do not depend on my web host?
Encrypt the mysqldump file.  Use FTP to fetch it.  Then you don't have 
to worry about e-mailing large files.  If you weren't on a hosting plan 
and maybe if you had more control over the server, I might've suggested 
the crontab job that I wrote you about yesterday so a script could be 
run and everything happens on a schedule.  It's possible that if you ask 
their sysadmin nicely, he can do it for you.

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