1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    11
    Vote Rating
    0
    deamon1767 is on a distinguished road

      0  

    Default Help with designer and direct

    Help with designer and direct


    I am using a router and query class to pull data, but its only pulling data from the first table
    Sample below, what am I doing wrong?

    Code:
    <?php
    class QueryDatabase
    {
    	protected $_db;
    	protected $_result;
    	public $results;
    	
    	public function __construct()
    	{
    		$_db = new mysqli('localhost', 'torustec_corp' ,'jr11767', 'torustec_corpdemo');
    		
    		if ($_db->connect_error) {
    			die('Connection Error (' . $_db->connect_errno . ') ' . $_db->connect_error);
    		}
    		
    		return $_db;
    	}
    	
    	public function getResults(stdClass $params)
    	{
    		
    		$_db = $this->__construct();
    
    
    		$_result = $_db->query ("SELECT maint_priority, maint_order_number, maint_date_entered, maint_customer_name, maint_address, maint_called_in, maint_login_time, maint_logout_time FROM maintorders");("SELECT assigned_priority, assigned_order_number, assigned_date_entered, assigned_customer_name, assigned_address, assigned_called_in, assigned_login_time, 
    assigned_logout_time FROM asworkorders") or die('Connect Error (' . $_db->connect_errno . ') ' . $_db->connect_error);
    
    
    
    
    
    
    				
    		$results = array();
    		
    		while ($row = $_result->fetch_assoc()) {
    			array_push($results, $row);
    		}
    		
    		return $results;
    	}
    		
    	public function __destruct()
    	{
    		$_db = $this->__construct();
    		$_db->close();
    		
    		return $this;
    	}
    }

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Sounds like this is more a PHP question; You may be better off posting to a PHP forum or to the Direct forum.

    I'll check within the team to see if someone could help you out with the PHP side of things. I cannot.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    This is PHP related but i will attempt to help. As far as i can tell your 2nd Select is just hanging in there. You need to add $_db->query to it and concat the 2 results before sending the response.

    Code:
    ("SELECT assigned_priority, assigned_order_number,
    Bharat Nagwani
    Sencha Designer Development Team

Thread Participants: 2

Tags for this Thread