Dear Sirs and Madams,
Receive as information that storing a MYSQL result under $_SESSION was
accelerating web page displays processes ? Absolutly needed but
impossible to get this working !
I try, but do not succeed in implement $_SESSION with MYSQL.
<?php
session_start() ;
include_once("c onnector.php");
$cerise=$_REQUE ST['cerise'];
$raisin=$_REQUE ST['raisin'];
$rsstatus = getVignoble("ps .cerise_id=$cer ise and b.raisin_id
$raisin");
// getVignoble is a fonction Select a status for #cerise and #raison
from a table
if(isset($_SESS ION['status'])) {
$_SESSION['status']=$rsstatus;
$bob=$_SESSION['status'];
echo 'case 1 <br>';
} else {
$rsstatus = getVignoble("ps .cerise_id=$cer ise and b.raisin_id
$raisin");
$bob=$_SESSION['status'];
echo 'case 2 <br>';
}
// Result is A. I would like to get that A stored, that would avoid
making a second time the MySQL query.
// I try that that works, but still, I believe that does the query and
that does not use the $_SESSION system :
echo $bob[0]['status'];
// That one Unfortunatly does not work : I would have believed the
contrary :
$_SESSION[0]['status']
// That one ask the Array :
$_SESSION['status']
// But the session is launched:
$_SESSION['myName'] = 'bpat1434';
echo '<br><br>My Name Is (session set): ' . $_SESSION['myName'];
?>
Do you know how to use $_SESSION as $_SESSION[0]['status'] in that
e.g.
Thank you very much for your knowleadge and experience.
cougloff
Receive as information that storing a MYSQL result under $_SESSION was
accelerating web page displays processes ? Absolutly needed but
impossible to get this working !
I try, but do not succeed in implement $_SESSION with MYSQL.
<?php
session_start() ;
include_once("c onnector.php");
$cerise=$_REQUE ST['cerise'];
$raisin=$_REQUE ST['raisin'];
$rsstatus = getVignoble("ps .cerise_id=$cer ise and b.raisin_id
$raisin");
// getVignoble is a fonction Select a status for #cerise and #raison
from a table
if(isset($_SESS ION['status'])) {
$_SESSION['status']=$rsstatus;
$bob=$_SESSION['status'];
echo 'case 1 <br>';
} else {
$rsstatus = getVignoble("ps .cerise_id=$cer ise and b.raisin_id
$raisin");
$bob=$_SESSION['status'];
echo 'case 2 <br>';
}
// Result is A. I would like to get that A stored, that would avoid
making a second time the MySQL query.
// I try that that works, but still, I believe that does the query and
that does not use the $_SESSION system :
echo $bob[0]['status'];
// That one Unfortunatly does not work : I would have believed the
contrary :
$_SESSION[0]['status']
// That one ask the Array :
$_SESSION['status']
// But the session is launched:
$_SESSION['myName'] = 'bpat1434';
echo '<br><br>My Name Is (session set): ' . $_SESSION['myName'];
?>
Do you know how to use $_SESSION as $_SESSION[0]['status'] in that
e.g.
Thank you very much for your knowleadge and experience.
cougloff
Comment