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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:20:38+00:00 2026-06-15T11:20:38+00:00

Hey guys i want a sum of an mysql query and an php variable.

  • 0

Hey guys i want a sum of an mysql query and an php variable. Is there a function to do this? Here is what i tried:

$result3 = mysql_query($sql3);
                while ($resultarray3 = mysql_fetch_array($result3)){
                $Ergebnis = $Menge + $resultarray['Bestand'];
                echo $Ergebnis;
                }

Can anyone help me on this?

Edit: I want a sum of an php variable and an mysql query not of two sql tables!!!!

  • 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-15T11:20:40+00:00Added an answer on June 15, 2026 at 11:20 am
    $menge = '';
    $result3 = mysql_query($sql3);
    while ($resultarray3 = mysql_fetch_array($result3)){
      $menge = $menge + $resultarray3['Bestand'];
    }
    // result => $menge
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I'm kinda struggling with how to do this query properly. I want
Hey guys i want to use two arrays in on mysql UPDATE query. So
Hey guys i want to use an php variable as a part of a
Hey guys, I want to store a categorized list of URLs. This is an
Hey guys I have an assigned array from mysql results and I simply want
Hey guys I have an ajax jquery function that receives data from a php
Hey guys i want to parse this type of string: {1: [ {OrderItemId:832,ItemId:995,Price:0}, {OrderItemId:833,ItemId:997,Price:0},
Hey guys, I want to make a function loop over all elements that have
Hey guys this is a snippet of my current code. I want to know
Hey guys, I got this JS code and want to add a slight fade

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.