j.silver Posted May 15, 2015 Share Posted May 15, 2015 One example of a multiple query, which runs fine in my server is: SELECT city, name FROM customers However, another way (though not a better way) of writing same has been running fine in a tutorial I saw, but is not running in my case: SELECT city FROM customers; SELECT name FROM customers; I would appreciate any thought on why it runs for that person and not for me, noting that there was no typos in my queries, which I attempted many times. MySQL Server version: 5.6.16, Xampp 1.8.33 for windows. Link to comment Share on other sites More sharing options...
j.silver Posted May 15, 2015 Author Share Posted May 15, 2015 Xampp 1.8.3 (sorry for the typo) Link to comment Share on other sites More sharing options...
Ingolme Posted May 15, 2015 Share Posted May 15, 2015 Are you doing this through the command line? Link to comment Share on other sites More sharing options...
j.silver Posted May 15, 2015 Author Share Posted May 15, 2015 No, both the person in the tutorial and myself were using PhpMyAdmin. Link to comment Share on other sites More sharing options...
j.silver Posted May 15, 2015 Author Share Posted May 15, 2015 I forget to state what result I was getting: the result of the last query only. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2015 Share Posted May 15, 2015 There's no reason why the first query would run and the other 2 wouldn't. Link to comment Share on other sites More sharing options...
j.silver Posted May 15, 2015 Author Share Posted May 15, 2015 Dear Justomeguy, that's why I got puzzled, tried again and again but that's what I had been getting all the time, and because I couldn't find a reason, I thought somebody else might share their experience and finding. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2015 Share Posted May 15, 2015 There's literally no reason. You might just not be using phpMyAdmin correctly, if it's showing the results from a previous query then that's an indication. Link to comment Share on other sites More sharing options...
Ingolme Posted May 15, 2015 Share Posted May 15, 2015 Perhaps only the results of the last query are displayed. I don't know how phpMyAdmin displays results of multiple queries. I usually don't use it. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2015 Share Posted May 15, 2015 I thought he was using the term "multiple query" wrong, in describing the first one that returned 2 columns as a multiple query. If I do actually run multiple queries it looks like it shows a result set for each one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now