List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:September 3 2005 12:49pm
Subject:Re: Multiple query execution (probably OT)
View as plain text  
Hello.

There is an example:
  http://lists.mysql.com/mysql/175004


"Alvaro Cobo" <coboalvaro@stripped> wrote:
> Hi guys:
> 
> This is probably an off-topic, and more related to PHP, but it is related to
> mysql as well
> 
> I need to execute two insert queries into a single statement from a PHP
> application, but it keeps giving me an error.
> 
> I have found this page
> know how to implement it:
> 
> "From version 4.1, MySQL supports the execution of multiple statements
> specified in a single query string. To use this capability with a given
> connection, you must specify the CLIENT_MULTI_STATEMENTS option in the flags
> parameter of mysql_real_connect() when opening the connection. You can also
> set this for an existing connection by calling MySQL Reference Manual ::
> 23.2.9 C API Handling of Multiple Query Execution mysql_set_server_option
> MYSQL_OPTION_MULTI_STATEMENTS_ON) By default, mysql_query() and
> mysql_real_query() return only the first query status and the subsequent
> queries status can be processed using mysql_more_results() and
> mysql_next_result()"
> 
> Does anybody has tried it in php. Does anyone could share an example.
> 
> Thanks and best regards.
> 
> Alvaro.
> 
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
Trouble with revoke allScott Haneda2 Sep
  • Re: Trouble with revoke allGleb Paharenko2 Sep
    • Re: Trouble with revoke allScott Haneda2 Sep
      • Re: Trouble with revoke allMichael Stassen2 Sep
        • Re: Trouble with revoke allScott Haneda3 Sep
          • Re: Trouble with revoke allMichael Stassen3 Sep
            • Re: Trouble with revoke allScott Haneda3 Sep
              • Multiple query execution (probably OT)Alvaro Cobo3 Sep
                • Re: Multiple query execution (probably OT)Gleb Paharenko3 Sep
                • How to migrate from V4.0.23 to V5?Siegfried Heintze4 Sep
                  • Re: How to migrate from V4.0.23 to V5?Gleb Paharenko5 Sep
      • Re: Trouble with revoke allGleb Paharenko2 Sep
        • Re: Trouble with revoke allScott Haneda3 Sep
    • 2 query questionsYL2 Sep
      • Re: 2 query questionsJason Pyeron2 Sep
      • Re: 2 query questionsSGreen2 Sep
        • string->array question. ( 2 query questions)YL3 Sep
          • Re: string->array question. ( 2 query questions)Peter Brawley3 Sep
        • Re: string->array question. ( 2 query questions)YL3 Sep
          • Re: string->array question. ( 2 query questions)Peter Brawley3 Sep