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 9123003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:14:08+00:00 2026-06-17T06:14:08+00:00

My question is why it don’t show $aantalkeermenu. but it show’s the other variable’s

  • 0

My question is why it don’t show $aantalkeermenu. but it show’s the other variable’s from the query can anyone help me with that?

This is my query:

$sql = "SELECT res.reserveringsnr, res.datum, menr.reserveringsnr, menr.menunr, SUM(menr.aantalkeermenu), men.menunr, men.menunaam, men.voorgerecht, men.hoofdgerecht, men.nagerecht  FROM reserveringen AS res
                INNER JOIN menus_regel as menr
                ON res.reserveringsnr = menr.reserveringsnr
                INNER JOIN menus AS men
                ON menr.menunr = men.menunr
                WHERE res.datum = '".$invoerdatum."'
                GROUP BY menr.menunr 
                ";

Here is show it on my webpage:

        $result = mysql_query($sql);

        echo "<table>";
        echo "<th>Aantal</th> <th> Menunaam </th><th> Voorgerecht </th> <th> Hoofdgerecht </th> <th> Nagerecht </th>";

        while($row = mysql_fetch_assoc($result)) {
            $datum = $row['datum'];
            $aantalkeermenu = $row['aantalkeermenu'];
            $menunr = $row['menunr'];
            $menunaam = $row['menunaam'];
            $voorgerecht = $row['voorgerecht'];
            $hoofdgerecht = $row['hoofdgerecht'];
            $nagerecht = $row['nagerecht'];
            $aantalkeermenu = $row['aantalkeermenu'];


        // open tr
        echo "<tr id='$menunr' class='edit_tr'>";
        echo "<td><span>$menunr</span></td>";           
        echo "<td><span>$aantalkeermenu</span></td>"; 
        echo "<td><span>$menunaam</span></td>"; 
        echo "<td><span>$voorgerecht</span></td>"; 
        echo "<td><span>$hoofdgerecht</span></td>"; 
        echo "<td><span>$nagerecht</span></td>"; 



        echo "</tr>"; 
        // close tr
        }           
        echo "</table>";
  • 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-17T06:14:09+00:00Added an answer on June 17, 2026 at 6:14 am

    When you

    select ... SUM(menr.aantalkeermenu)
    

    the resulting column won’t be called aantalkeermenu. You need to explicitely name the column, like this

    select ... SUM(menr.aantalkeermenu) as aantalkeermenu
    

    and then it will appear in under that name in the resulting row.

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

Sidebar

Related Questions

This is a simple question but I don't know how to construct a variable
I've searched for this question but I don't know if I've phrased it correctly.
Ok so this maybe a simple/silly question but I don't know so here goes:
This is a very amateur question (don't rate me down for it) but how
I have a simple question but don't know exactly how to achieve this. All
This may be a silly question I don't know. Is there a way to
Here's a question that I don't quite understand: The command, system(pause); is taught to
It is a simple question but I don't know how to do it because
I came up with this question because I don't understand how address translation is
I didn't find an answer to this question because I don't know if I'm

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.