title: How to run two queries?(Joomla, mysql)
body: <p>I want that when someone votes for article information, it gets inserted into two tables 
  (or run any two queries, does not matter, insert, update or select).
  I am using Joomla! 2.5.0 Stable.</p>
  
  <p><code>components/com_content/models/article.php</code>
  <code>public function storeVote($pk = 0, $rate = 0)</code></p>
  
  <p>when executing this query:</p>
  
  <p><code>$db-&gt;setQuery(
                          'INSERT INTO #__content_rating ( content_id, lastip, rating_sum, rating_count )' .
                          ' VALUES ( '.(int) $pk.', '.$db-&gt;Quote($userIP).', '.(int) $rate.', 1 )'</code></p>
  
  <p>I want that the information in <code>#__content</code> table will be inserted too.
  How do I achieve that?
  I tried following, but it does not work:</p>
  
  <p><code>$db-&gt;setQuery(
                          'INSERT INTO #__content_rating ( content_id, lastip, rating_sum, rating_count )' .
                          ' VALUES ( '.(int) $pk.', '.$db-&gt;Quote($userIP).', '.(int) $rate.', 1 )'</code></p>
  
  <p><code>// 'UPDATE #__content ' .
                             ' SET testas2 = rating_sum + '.(int) $rate .
                             ' WHERE content_id = '.(int) $pk</code></p>
  
  <p><code>// 'INSERT INTO #__content ( testas2 )' .
                         ' VALUES (7799)'
              );</code></p>
  
  <p>This is picture with the syntax:
  <a href="http://i49.tinypic.com/1ruux0.jpg" rel="nofollow">http://i49.tinypic.com/1ruux0.jpg</a></p>
  
  <p>I read about MySQL transaction, will it help me in this case? If yes, then what should the syntax should look like?
  Any advice is much appreciated.</p>