Need some examples of usages of JDatabaseQuery

46 views
Skip to first unread message

xillibit

unread,
Apr 26, 2013, 10:48:34 AM4/26/13
to joomla-de...@googlegroups.com
Hello,

I need some examples of replacements with JDatabaseQuery for the followings MySQL functions:

  • MAX()
  • TRIM()
  • COUNT(*)
  • SUM()
  • INSERT IGNORE INTO
  • DISTINCT
  • REPLACE INTO

For this kind of query how i do with JDatabaseQuery :

INSERT INTO #__myusers (userid,options) SELECT a.id AS userid, 1 AS options
                    FROM #__users AS a
                    LEFT JOIN #__myusers AS b ON b.userid=a.id
                    WHERE b.userid IS NULL


Thanks in advance

Reply all
Reply to author
Forward
0 new messages