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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:28:05+00:00 2026-06-18T15:28:05+00:00

Ok below is my code and I’ve tried to debug it with var_dumps ..

  • 0

Ok below is my code and I’ve tried to debug it with var_dumps .. var_dump($insertion) returns through , which means that the query inserts into the database but for some reason , I’ll get the warning message when I wanna see if mysql_num_rows is doing its job and it returns FALSE with the warning message of the title .. Below is my short straight-forward code

<?php

require'sensdb.php';

if (sensdb_connect()) {

$select = "SELECT SubGroupID from STx WHERE GroupID = '39'AND Status ='Provisioned'";

$result = mysql_query($select);
$result_count = mysql_num_rows($result);

  if($result_count > 0)
   {
       while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {


         if($row['SubGroupID'] != 123) {

        $insert = "INSERT INTO Routes (SubGroupID,GroupID,URL) VALUES (".$row['SubGroupID'].",39,'mailto://e2pressure@gmail.com')";
        $insertion = mysql_query($insert);
        $insertion_count =  mysql_num_rows($insertion); var_dump($insertion_count);
        $select_route_id = "SELECT RouteID FROM Routes WHERE SubGroupID =".$row['SubGroupID']." AND GroupID = 39";
        $result_route_id = mysql_query($select_route_id);
        $result_route_count = mysql_num_rows($result_route_id);
         if($insertion_count > 0 ) {
         if($result_route_count > 0) {
            $row_route = mysql_fetch_array($result_route_id,MYSQL_ASSOC);
             $update = "UPDATE STx SET RouteID =".$row_route['RouteID']." WHERE SubGroupID =".$row['SubGroupID']."";
             var_dump($update);

             }

           }

         }

     }

  }

}
  • 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-18T15:28:06+00:00Added an answer on June 18, 2026 at 3:28 pm

    From the PHP docs:

    Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use mysql_affected_rows().

    PHP.net

    Also, you should really be using PDO (or something like it).

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

Sidebar

Related Questions

below code is my quickselect (something very similar to quicksort except that it returns
Below code returns ? rather than a random character. Any ideas? Please note that
below code is my databasehandler class i got it from a tutorial. Beside that
HI: Below code is from RequestFactoryEditorDriver: /** * Returns a new array containing the
Below code is the part of the script, in which I am merging files
The below code is working but has a bug. The scenario is that, I
Below code is working fine in my application. But that leftbarbuttonitem is invisible. And
Below code is written to call parameterized select query in asp.net public bool checkConflictTime()
Partial Code: My below code pulls a query from my DB and then uses
below code: def http = new HTTPBuilder( 'http://twitter.com/statuses/' ) http.get( path: 'user_timeline.json', query: [id:'httpbuilder',

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.