Search Results

Search found 4 results on 1 pages for 'kaartz'.

Page 1/1 | 1 

  • two where conditions in a mysql query

    - by Kaartz
    I have a table like below |date|dom|guid|pid|errors|QA|comm| |2010-03-22|xxxx.com|jsd3j234j|ab|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|ab|No|xxxxxx|| |2010-03-22|xxxx.com|jsd3j234j|if|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|if|No|xxxxxx|| |2010-03-22|xxxx.com|jsd3j234j|he|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|he|No|xxxxxx|| I want to retrieve the total count of "dom" referred to each "QA" and also I need the count of "errors" detected by the "QA" SELECT date, count(dom), QA FROM reports WHERE date="2010-03-22" GROUP BY QA |2010-03-22|2|ab| |2010-03-22|2|if| |2010-03-22|2|he| SELECT date, count(dom), count(errors), QA FROM reports WHERE errors="Yes" GROUP BY QA |2010-03-22|1|ab| |2010-03-22|1|if| |2010-03-22|1|he| I want to combine the above two queries, is it possible. If I use the below query, I am not getting the desired result. SELECT date, count(dom), QA, count(errors) FROM reports WHERE date="2010-03-22" AND errors="Yes" GROUP BY QA I want the below output |2010-03-22|2|ab|1| |2010-03-22|2|if|1| |2010-03-22|2|he|1| Please help me.

    Read the article

  • greasemonkey insert javascript

    - by Kaartz
    I have a bookmarklet, clicking the bookmarklet includes a PHP script (evaluated as a JavaScript file) to the page few table values and select values passed as GET parameters. The PHP script writes the page data to the MySQL database, and outputs a success message that is treated as JavaScript code and executed by the browser. Is there any possibility to do this using greasemonkey and call this function when a existing button is clicked on the web page. I wrote the above bookmarklet inspired by this tutorial. http://tutorialzine.com/2010/04/simple-bookmarking-app-php-javascript-mysql/ This is the bookmarklet code: (function () { var jsScript = document.createElement('script'); jsScript.setAttribute('type', 'text/javascript'); jsScript.setAttribute('src', '/bookmark.php?url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title)); document.getElementsByTagName('head')[0].appendChild(jsScript); })(); Please help me.

    Read the article

1