Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
I need help
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Suriyakala Govindaraj  
View profile  
 More options Oct 3 2012, 4:44 am
From: Suriyakala Govindaraj <vksuriya2...@gmail.com>
Date: Wed, 3 Oct 2012 16:43:58 +0800
Local: Wed, Oct 3 2012 4:43 am
Subject: I need help

Hi everybody,

What is the problem in this query

i dump the variable outside the foreach function
array is empty.
but inside foreach  some resords are comming.

anybody plz help .

$db = Doctrine_Manager::getInstance()->getCurrentConnection();

           $count = 0 ;

          $sql = "  SELECT *
                    FROM album a,meetnewpeople m
                    WHERE
                        a.personal_id = ".$this->personal->getId()."
                         AND a.type ='plan' " ;

        $query = $db->prepare($sql);
        $query->execute();
        $plans = $query->fetchAll();
        //$planalbum[] = array();
        $this->planalbum = new ArrayObject();
        foreach($plans as $plan)
           {
            $sql = " Select * from picture p
                        where
                            p.personal_id = :personal_id
                            and p.description = 'main picture'
                            and p.album_id = ".$plan["album_id"];

            $query = $db->prepare($sql);

            $query->execute(array('personal_id' =>
$this->personal->getId()));
            $result = $query->fetchAll(PDO::FETCH_ASSOC);
             var_dump($result);
            $this->planalbum->append($result);
            }

        //print_r();

     var_dump($this->planalbum);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »