limit columns on INNER JOIN

Is there a way to limit which columns show up on INNER JOINs? Or are you stuck pulling all of the columns in a table during a joined SELECT? This can get pretty ugly if are doing multiple INNER JOINs. Especially if you are using mysqli_stmt_bind_result(), because the script dies unless you shove all those columns into variables.

Suggestions? Am I missing something simple?

Ah, figured it out. Didn’t realize you could specify column names from any of the tables after SELECT.

Glad you figured it out, if you have any more SQL questions ask, those are my favorite!

Sponsor our Newsletter | Privacy Policy | Terms of Service