Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:46:25+00:00 2026-06-13T16:46:25+00:00

I am trying to use all columns for each row from one table (party),

  • 0

I am trying to use all columns for each row from one table (party), and some columns from another (customer).

Ok, here is my code

public function getParty($data = array()) {

    $sql = "SELECT party.* , customer.customer_id AS customerID, customer.firstname AS customerFN, customer.lastname AS customerLN, customer.email AS customerEMAIL, customer.ip AS cutomerIP
    FROM `" . DB_PREFIX . "party` 
    JOIN `" . DB_PREFIX . "cutomer` 
    ON party.cutomer_id = customer.customer_id
    WHERE status=3";

    $sort_data = array(


        'date_added',
        'order_id',
        'customer_id',
        'customerFN',
        'customerLN',
        'customerEMAIL',
        'customerIP',
        'description',
        'status',
        'amount'


    );

    if (isset($data['sort']) && in_array($data['sort'], $sort_data)) {
        $sql .= " ORDER BY " . $data['sort'];   
    } else {
        $sql .= " ORDER BY date_added"; 
    }

    if (isset($data['order']) && ($data['order'] == 'DESC')) {
        $sql .= " DESC";
    } else {
        $sql .= " ASC";
    }

    if (isset($data['start']) || isset($data['limit'])) {
        if ($data['start'] < 0) {
            $data['start'] = 0;
        }           

        if ($data['limit'] < 1) {
            $data['limit'] = 20;
        }   

        $sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit'];
    }

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

    return $query->rows;
}

And here is the error

Notice: Error: Table 'XXX.cutomer' doesn't exist
Error No: 1146
SELECT party.* , customer.customer_id AS customerID, customer.firstname AS customerFN, customer.lastname AS customerLN, customer.email AS customerEMAIL, customer.ip AS cutomerIP FROM `party` JOIN `cutomer` ON party.cutomer_id = customer.customer_id WHERE status=3 ORDER BY date_added ASC LIMIT 0,10 in /srv/www/htdocs/XXX/system/database/mysql.php on line 49

Maybe I am wrong somewhere, but do not see it

Greetings
Petar Stoyanov

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:46:27+00:00Added an answer on June 13, 2026 at 4:46 pm
    JOIN `" . DB_PREFIX . "cutomer` 
    

    Should be

    JOIN `" . DB_PREFIX . "customer` 
    

    ?

    Also…

    ON party.cutomer_id = customer.customer_id
    

    Should be

    ON party.customer_id = customer.customer_id
    

    ?

    I would search for all instances of cutomer and replace them with customer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Scala/Swing to create a Table, one of whose columns is
I'm trying to generate all possible 'ways' from one element in matrix to another,
I am trying to use Linq2Sql to return all rows that contain values from
Hi I am trying to use the solution from Find all pattern indexes in
I'm trying to use the css3 flexbox module in order to have table columns
I have CF with 1280 rows. Each row has 6 columns. Im trying to
I am trying to select multiple columns, but not all of the columns, from
I'm trying to link the items from a specific column, but each one will
I am trying to use nosetests to run all test cases inside my project.
I'm trying to use my variable in all files of my program. this is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.