MySQL query execution return value?

I'm constructing an adapter for MySQL in PHP and I was wondering what should MySQL query execution method return? Should it return a result set? Or the last id / affected rows?

This question and answers originated from www.stackoverflow.com
Question by (10/8/2009 7:41:21 AM)

Answer

mysql_query() returns a result set on success, or false if something went wrong.

http://us3.php.net/manual/en/function.mysql-query.php


Find More Answers
Related Topics  mysql  query  execution  result
Related Questions
  • MySql query execution time

    I am using MySQL Workbench on Windows. How do I find out the time taken to execute a query like Select * from employers where employerid > 200 Is there a statement I can enter that returns…
  • PHP MySQL INSERT return value with one query execution

    Is there anything returned from MySQL/PHP on a INSERT query being executed? Here is my function which I have in a CLASS. function mysqlQuery($query) { // Gets the results from the query $resu…
  • mysql query execution time | reduce query

    I have a query which let me to change users order. here is my query: update test set orderID = case orderID when (select orderID from ( select * from test where orderID > ( select …
  • mysql query result

    I have built this query that is kind of self explanatory: SELECT events.*,(SELECT COUNT(*) FROM events_participants WHERE events_participants.eventid=events.eventid)AS participants,linkViews.totV…
  • Mysql Slow query execution

    I have one procedure which retrieves all the records from one table which has more than 20000 records and two columns. the column i m trying to retrieve has the index on it. But still it takes mo…
  • MySQL Query that return "not exists value"

    I want to know is it possible to do if I have 4 number as below 1,2,3,4 In my data base have data exists as below 1,2,3,5,6,7 How can I query database and return 4 in 1 query Please …
  • Order of execution of ORDER BY and LIMIT in a MySQL query

    I have a query like this where I want to display sorted records in a paginated format. This is my query. SELECT * FROM answers WHERE userid = '10' ORDER BY votes LIMIT 10, 20 The two argum…
  • MySQl Query Execution Plan

    Does MySQL optimizer changes the execution plan based on the WHERE condition ? If I add one extra column for the comparison in WHERE condition , does it affect query execution plan ? Thanks, S…
  • MYSQL query execution time

    I have a question for you. I have this database with 250.000 recordings, with 2 text fields each containing up to 300 words. And I want do select all the data that meets some criteria and put it in …
  • mysql query execution time - can i get this in milliseconds?

    I'm comparing a few different approaches to getting some data in mysql, directly at the console, using the SQL_NO_CACHE option to make sure mysql keeps running the full query every time. Mysql gives…