php-general Digest 26 Jun 2005 16:39:01 -0000 Issue 3534

Topics (messages 217641 through 217650):

SCORM & PHP
        217641 by: Rodolfo Gonzalez Gonzalez

array_diff php version
        217642 by: André Le Tissier

including the result of one query in another query
        217643 by: Pedro Quaresma de Almeida
        217644 by: Jochem Maas
        217645 by: Brian V Bonini

Re: css/html expertise??
        217646 by: David Dorward

$_SESSION and header()
        217647 by: Alessandro Rosa
        217648 by: Paul Waring
        217649 by: Alessandro Rosa

PHP vs. ColdFusion
        217650 by: Rick Emery

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hello,

I have searched freshmeat/hotscripts/google/... for some class or "simple" PHP script (not a full LMS) to display SCORM content, without success. Does someone know about this topic or if such a class/script exists?, thanks a lot in advanced for your help.


Regards.

--- End Message ---
--- Begin Message ---
Help! Array_diff is the perfect function for what I am try to do but I have
a php version 4.1.5. Is there any replacement I can use to achieve the same
result

 

Many thanks,

 

André Le Tissier

 


--- End Message ---
--- Begin Message ---
Hi

I have two databases, on for aeromodelistas (aeromodelling) and
another for Códigos Postais (Postal Codes). I whant to do the
following query

SELECT CódigoPostal FROM Aeromodelistas 
WHERE CódigoPostal IN 
  (SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO
   WHERE codigopostal.LOCART.DD=codigopostal.DISTRITO.DD 
   AND   codigopostal.DISTRITO.DESIG='Coimbra'); 

This query is not working, and I do not know why. If I try the two
queries individualy they work, togheter they don't!?

But the question I want to put to the members of this list is the
following. Is it possible to do the following?

// first do the subquery
$sql_CP4s = "select distinct(CP4) from 
codigopostal.LOCART,codigopostal.DISTRITO where 
codigopostal.LOCART.DD=codigopostal.DISTRITO.DD and 
codigopostal.DISTRITO.DESIG='$nomeDistrito'";

$resultado_CP4s = mysql_query($sql_CP4s,$ligacao);

$linha_CP4s = mysql_fetch_assoc($resultado_CP4s);

// then use it in the main query

$sql_Aero_Dist_Masc = "select count(Nome) from Aeromodelistas where 
year(AnoQuota)=2005 and Sexo='Masculino' and Distrito IN $linha_CP4s";

How can we include the results (not just one) of one query in another
query?

Is it possible?

Thanks.

-- 
Pedro Henrique e Figueiredo Quaresma de Almeida

--- End Message ---
--- Begin Message ---
Pedro Quaresma de Almeida wrote:
Hi


its not a php question.

I have two databases, on for aeromodelistas (aeromodelling) and
another for Códigos Postais (Postal Codes). I whant to do the

what DB are you using? MySQL?
you can't select across multiple DBs in any RDMS that I know of ...
so it looks like either use 2 queries or merge the DBs?

--- End Message ---
--- Begin Message ---
On Sun, 2005-06-26 at 06:38, Pedro Quaresma de Almeida wrote:
> Hi
> 
> I have two databases, on for aeromodelistas (aeromodelling) and
> another for Códigos Postais (Postal Codes). I whant to do the
> following query
> 
> SELECT CódigoPostal FROM Aeromodelistas 
> WHERE CódigoPostal IN 
>   (SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO
>    WHERE codigopostal.LOCART.DD=codigopostal.DISTRITO.DD 
>    AND   codigopostal.DISTRITO.DESIG='Coimbra'); 


I believer DISTINCT is not an SQL function, it's a statement.

SELECT DISTINCT column_name FROM table_name;

--- End Message ---
--- Begin Message ---
bruce wrote:

> i'm playing around with css (classes/ids/etc...) does anybody here have
> any experience with this or could answer a few questions??

http://www.css-discuss.org/
http://groups-beta.google.com/group/comp.infosystems.www.authoring.stylesheets

-- 
David Dorward       <http://blog.dorward.me.uk/>   <http://dorward.me.uk/>
                     Home is where the ~/.bashrc is

--- End Message ---
--- Begin Message ---
(a) : After saving a couple of data into two $_SESSION variables from a
form,
(b) : I used the header() function to redirect the browser to
(c) : display another page.

But, when I'm in the new page of (c), the $_SESSION variables stored
in (a) are no longer available and I can get anymore their values then,
(I can't say if they have been unset or erased).

I presume there's some relation with the use of header() and
the lost data.
My intention is to keep the automatic redirection by the header().

Any suggestion?
Thanks in advance.

Alessandro Rosa

--- End Message ---
--- Begin Message ---
On Sun, Jun 26, 2005 at 04:33:30PM +0200, Alessandro Rosa wrote:
> But, when I'm in the new page of (c), the $_SESSION variables stored
> in (a) are no longer available and I can get anymore their values then,
> (I can't say if they have been unset or erased).

You have to pass the session ID between pages, either by setting
session.use_cookies = 1 (so that the session ID is passed using a
cookie where possible) or append the session ID to the URL you are
redirecting to as part of the query parameters.

Paul

-- 
Rogue Tory
http://www.roguetory.org.uk

--- End Message ---
--- Begin Message ---
Does (c) have at the top of its page:
<?php session_start(); ?>

André


> You have to pass the session ID between pages, either by setting
> session.use_cookies = 1 (so that the session ID is passed using a
> cookie where possible) or append the session ID to the URL you are
> redirecting to as part of the query parameters.

Paul


Thank you both!
I did always use session_start() and finally I also already use
the second option Paul addressed, in order to overcome the
issues raised by header(). Not in the same terms, but the URL
parameters was my idea too.

So could I guess that this is there's no direct remedy to
avoid header() delete sessions variables?    :-)

Alessandro

--- End Message ---
--- Begin Message --- My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term).

We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some "ammunition" that I can take into a meeting to "sell" management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end.

Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to "sell" it to management (I'm already on the PHP side), so links to data or articles comparing the two are best.

Thanks in advance,
Rick
--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
                                             -- Leonardo Da Vinci

--- End Message ---

Reply via email to