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

  • Home
  • SEARCH
  • 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 7816935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:03:19+00:00 2026-06-02T06:03:19+00:00

Suppose I am firing query that will upadte data if all value are available

  • 0

Suppose I am firing query that will upadte data if all value are available else will run with 0 rows updated. So How to get those 0 rows updated query/data from Oracle db in PHP?

In my script, I am updating table if item_flag is N, item_name is stored in $sku so checking with that & site_code is in $final_code so all these in where condition.
so if update query runs successfully with value updation then I am taking execution result in $result & updating status of Mysql table.

But what happened is when there is some data not present say $sku in update query then query runs with 0 rows updated…& likewise it will move to if($result) loop & update the status which I don’t want as practically data/row is not get updated…

so How to get 0 rows updated query/data from Oracle in PHP?

        --------------some code above--------

            $query_ora_update = "UPDATE ITEM_DETAILS SET ITEM_FLAG= 'Y', LAST_UPDATE_DATE = sysdate WHERE ITEM_NAME = '$sku' AND SITE_CODE = '$final_code' AND ITEM_FLAG = 'N' ";
            $parse_result = oci_parse($conn,$query_ora_update);
            $result = oci_execute($parse_result);                          
            oci_commit($conn);

            if($result)                             
            {

               $query_update_alert = "UPDATE product_creation SET alert_status =1 where 
                    entity_id = $entity_id and sku = '$sku' and alert_status = 0";

$result_query_update_alert = mysql_query($query_update_alert);

             } 
        -------------------------------
  • 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-02T06:03:21+00:00Added an answer on June 2, 2026 at 6:03 am

    Use oci_num_rows function. Documentation Here

    EDIT: Example Code

    $parse_result = oci_parse($conn,$query_ora_update);             
    $result = oci_execute($parse_result);   
    $row_count = oci_num_rows($parse_result);                                    
    oci_commit($conn);              
    if($row_count > 0)
      { 
       -------------------
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have the following table data: ID parent stage submitted 1 1 1
Suppose, in MATLAB, that I have a matrix, A, whose elements are either 0
Suppose you have a subsystem that does some kind of work. It could be
Suppose I have a git repos that contains original.script . At some point, I
I want to select some data from db and store in an array. Suppose
Suppose we have an application that's stable. Tomorrow, someone reports a big ol' bug
I have this function that is supposed to query the database every 4 seconds
Suppose we have a map that is shared between multiple threads. It represents a
I'm having a problem with an if/else block. The problem is that the else
Suppose I have: public class foobar { public int lorem; public int ipsum; }

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.