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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:12:27+00:00 2026-06-11T09:12:27+00:00

the follow function is not working public function matchingService() { $stmt = mysqli_prepare($this->connection, INSERT

  • 0

the follow function is not working

public function matchingService() {

    $stmt = mysqli_prepare($this->connection, "
    INSERT INTO reusematching.matchedtable(user_idUser, productDetail_idProduct,Status,applyData)
        SELECT  waitinglist_user.user_idUser, 
                waitinglist_product.ProductDetail_idProduct, 
                productstatus,          
                waitinglist_user.waitinglistUser_applydata
                FROM reusematching.waitinglist_user, 
                reusematching.waitinglist_product, 
                productinformation.productdetail, 
                productinformation.productstatus
                where (waitinglistProduct_status = 1 
                and waitinglistUser_status = 1 
                and productCategroy_productCategroyID = waitinglistUser_applyProductType
                and ProductDetail_idProduct = idProduct
                and idStatus = waitinglistProduct_status);

    SET SQL_SAFE_UPDATES=0; 

    DELETE FROM reusematching.waitinglist_user
    WHERE Exists
                    (SELECT matchedtable.idMatchedTable
                        FROM  reusematching.matchedtable 
                        where  matchedtable.user_iduser= waitinglist_user.user_idUser);

    DELETE FROM reusematching.waitinglist_product
    WHERE Exists
                    (SELECT matchedtable.idMatchedTable
                        FROM  reusematching.matchedtable 
                        where  matchedtable.ProductDetail_idProduct
                                = waitinglist_product.ProductDetail_idProduct);

    SET SQL_SAFE_UPDATES=1;

    "); 

    $this->throwExceptionOnError();

    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();


    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);


    return null;
}

the flex shown

Server error MySQL Error – 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near ‘DELETE FROM reusematching.waitinglist_user
WHERE Exists (SELECT matche’ at line 18

Why I have this error? and how to debug it.

  • 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-11T09:12:28+00:00Added an answer on June 11, 2026 at 9:12 am

    The mysql driver in PHP does not allow multiple queries to be issued in a single query() call. This is true of both the old mysql and newer mysqli functions. This is a security measure to prevent some forms of SQL injection attacks.

    You’ll have to split your hideously big query statement into multiple (smaller) individual queries:

    a) INSERT ... SELECT
    b) SET ...
    c) DELETE ..
    d) etc...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, in my code I have for example, this: $('.follow').click(function(){ var myself = $(this);
I have this follow code in my javascript. I call this function when the
This has me stumped. The follow code returns ,,,,,,: <script type=text/javascript> $(function() { $('#listB').sortable({
I am not sure why this was working fine last night and this morning
Follow-up to this one . I got the reading/decoding working 1> {ok, F} =
my curl function cannot follow the redirection of Facebook external link redirector, l.php and
I have a function to follow the object after the mouse, and I want
I created a javascript class as follow: var MyClass = (function() { function myprivate(param)
I cannot follow crossval() & cvpartition() function given in MATLAB documentation crossval() . What
I have a JQuery validation files that look as follow: $('#TextBoxRisultati2b').on('blur', function () {

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.