Multi-query version of mysql_query???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce A. Julseth

    Multi-query version of mysql_query???

    Is there a multi-query version of mysql_query? I have my sql in a text file
    and it works great from the command line (mysql -u me -p <my.sql). my.sql
    had multiple lines of sql. I would now like to use that same file in my
    code, using fread and reading the complete file, then use this "Other"
    version of mysql_query with the contents of the this file as the argument.

    Thanks

    Bruce


  • ZeldorBlat

    #2
    Re: Multi-query version of mysql_query???

    On Apr 18, 9:04 pm, "Bruce A. Julseth" <bruceaj_nosp.. .@bellsouth.net >
    wrote:
    Is there a multi-query version of mysql_query? I have my sql in a text file
    and it works great from the command line (mysql -u me -p <my.sql). my.sql
    had multiple lines of sql. I would now like to use that same file in my
    code, using fread and reading the complete file, then use this "Other"
    version of mysql_query with the contents of the this file as the argument.
    >
    Thanks
    >
    Bruce
    I don't think the mysql extension has a function that can handle
    multiple results. The mysqli extension does, however. See
    mysqli_multi_qu ery:

    <http://www.php.net/mysqli_multi_qu ery>

    Comment

    • Bruce A. Julseth

      #3
      Re: Multi-query version of mysql_query???


      "ZeldorBlat " <zeldorblat@gma il.comwrote in message
      news:1176944911 .175221.52950@o 5g2000hsb.googl egroups.com...
      On Apr 18, 9:04 pm, "Bruce A. Julseth" <bruceaj_nosp.. .@bellsouth.net >
      wrote:
      >Is there a multi-query version of mysql_query? I have my sql in a text
      >file
      >and it works great from the command line (mysql -u me -p <my.sql). my.sql
      >had multiple lines of sql. I would now like to use that same file in my
      >code, using fread and reading the complete file, then use this "Other"
      >version of mysql_query with the contents of the this file as the
      >argument.
      >>
      >Thanks
      >>
      >Bruce
      >
      I don't think the mysql extension has a function that can handle
      multiple results. The mysqli extension does, however. See
      mysqli_multi_qu ery:
      >
      <http://www.php.net/mysqli_multi_qu ery>
      >
      Thank you. That looks like the function I was looking for...

      Bruce


      Comment

      Working...