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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:14:22+00:00 2026-05-22T19:14:22+00:00

if($num>0) { echo <table border=2> Table Request.$_SESSION[‘s1’]; echo<tr> <td>Id</td><td>Drug</td><td>Quantity</td> </tr>; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); $r[$i]=$row[1];

  • 0
if($num>0) {
    echo "<table border=2> Table Request".$_SESSION['s1'];
    echo"<tr>
        <td>Id</td><td>Drug</td><td>Quantity</td>
        </tr>";
    for($i=0;$i<$num;$i++) {
        $row=mysql_fetch_row($result);
        $r[$i]=$row[1];
        echo "<tr>";
        for($j=0;$j<$num1;$j++) {
            echo"<td>$row[$j]</td>";
        }
        echo"<td><input type='Checkbox' name='p[$i]'  value='on' unchecked /></td>";
        echo"<td><input type='txt' name='q[$i]' /></td>";
        echo"</tr>";
        $r[$i]=$row[1];
    }
    if(isset($_POST['p'])) {
        foreach($_POST['p'] as $key=>$value) {
            if($value == "on") {
                $query8 = "select $r[$i] from $_SESSION['t'] ";
                echo $query8;
                $result8 = mysql_query($query8);
                $num8=Mysql_num_rows($result8);
                if($num8!=0) {
                    $query7="select qun from $_SESSION['t']";
                    $result7 = mysql_query($query8);
                    //?????????????????
                }
            }
            echo"</table>";
        }
    }//result
}//else

I have a table request and another table for example E.

I want to compare the field quantity of these tables

if(select qun from request)<((select qun from $_SESSION['t'])) // some work

How can I write this code in the part that I marked with many question marks?
is this correct?

  • 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-05-22T19:14:23+00:00Added an answer on May 22, 2026 at 7:14 pm

    If you really want what the title says, why you don’t do something like that

    SELECT table1.quantity AS qu1, table2.quantity AS qu2 FROM table1, table2 WHERE your_conditions;
    

    When you get the results, you can compare qu1 against qu2.

    But if you are looking for something different, than please be more specific with your question.

    Actual example:

    $query8 = 'SELECT '.$_SESSION[ 't'].'.'.$r[$i].' AS qu1, request.qun AS qu2 FROM '.$_SESSION[ 't'].', request';
    $result8 = mysql_query($query8);
    while ($row8 = mysql_fetch_array($result8)) {
        if ($row8[ 'qu1'] < $row8[ 'qu2']) {
            echo 'the value from '.$r[$i]. ' is smaller';
        } elseif ($row8[ 'qu1'] > $row8[ 'qu2']) {
            echo 'the value from '.$r[$i]. ' is bigger';
        } else {
            echo 'both values are same';
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$n=mysql_num_rows($rs); $i=0; while($n>0) { while(($row=mysql_fetch_array($rs))&&$i<=5) { echo $row['room_name']; $i=$i+1; //echo $n.<br>; } echo <br>;
I have the following table: ID | NUM 1 | 4 2 | 9
I have a table like this: num | type -----+------ 123 | 3 123
I need some help sorting my score value's of my sql database <table border
I am writing following code to fetch a row from table: $query = SELECT
Back again I'm afraid! I have this SQL Query - populating a table. echo
num is a variable which is dynamically changed within 1 to 9. I must
num = 0000001000000000011000000000000010010011000011110000000000000000 for n in 0...num.length temp = num[n] dec = dec +
for num in {1..5} do perl simulate.pl file.txt file2.txt > output.txt done But my
I need to pick contact phone num, and I used to do it like

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.