query

  1. FoxSecrets

    XF 2.2 How to run single delete query in template

    How to run a single DELETE query in template something like the select below but not in loop? <xf:foreach loop="$xf.app.db.fetchAll('SELECT xxxxxxxx FROM xxxxxxxx WHERE id=1')" value="$item"> //.... </xf:foreach> Edit: please delete this thread, i've got a similar from another post...
  2. E

    XF 2.2 Is there a way to use Union with the finder?

    I want to retrieve a list of threads using an Union in the query. Is there a way to translate this query to the finder? SELECT * FROM ( ( SELECT xt.* FROM xf_thread xt WHERE xt.node_id = 100 ORDER BY xt.last_post_date DESC LIMIT 20 ) union (...
  3. forumSolution

    XF 2.2 Or condition on finder

    Hey, I want to write a query on xenforo that will have both operator AND , OR . If i use $item->where() then it will use only AND .. but if use $item->where()->whereOr(). Then it will wrap all OR condition in AND . Is there anyway i can write something like that . Select * from zyx where...
  4. S

    XF 2.2 Create a Search link / query

    Hi Guys n' Girls, I would like to pass a text into the search and then all search results should be output. I have tried it with the following. https://myproject.loc/search/?q=mytext The text is also passed into the search mask. But you have to click on search. I have seen that xenforo adds...
  5. Sal Collaziano

    Need help with a query

    I'd like to set the first X amount of members that signed up to a specific user group. How can I do that?
  6. CMTV

    XF 2.0 INNER JOIN in search

    Hi! This link will show all user posts: http://question.threads/index.php?search/member&user_id=1 Now how can I dispaly only posts with green diamond icon? Such "diamond" post ids are stored in xf_QT_best_answer table so I can get their ids with this query: SELECT `xf_post`.`post_id` FROM...
  7. CMTV

    XF 2.0 ->whereIds(...) Use IDs array order

    Hi! I have an ordered array of IDs gathered from complex SELECT query. Now I need to get entities with IDs from my array but in the order they are listed in IDs array! It can be done with this query: SELECT * FROM table WHERE id IN (5,4,3,1,6) ORDER BY FIELD(id, 5,4,3,1,6); But the porblem...
  8. Cupara

    XF 2.0 Cron Query

    So this is where I have ended up after days of trying. What I am doing is using JSON to gather data from another site then inserting that into the database. This will happen only once, then there will be a daily check that will check for specific updates to the data and update the entry once a...
  9. hutch2323

    XF 2.0 Passing values from a textbox to .php function

    Hello again! I'm attempting to build a custom query page whereby a user (for admin use only) can enter a username into a textbox, click a search button, and retrieve the stored information connected to the username. Currently, I have blocks of code, but I'm not entirely sure how to combine it...
  10. szymme

    [100$ for solution] SQL Query

    Hello, I need help. I need a .php file which is asking for a costum user field and a user group. Like ........\check.php?Account=4711 4711 must be filled in the custom user field ID 123456 AND be part of user group X. The output is a echo with OK or WRONG. I would be so happy if anybody...
  11. vlom31

    Please Help! SQL + Caching optimization

    Hi all, I am implementing a live feed on my xenforo homepage, meaning that it shows a list of recent posts, updated in real time, resulting in some heavy sql query(ies) every 1 second.. I am just testing it myself right now, so 1 user, and it's already putting the CPU under pressure, the way...
  12. Sim

    Fixed Cache or optimise recent comments block query

    I just finished a test import of ZooChat from vB3.8+PhotoPost to XenForo+XFMG, with 423K posts and 277K photos, including 2,219 galleries. My initial testing is quite positive - no major issues so far, even with large numbers of galleries. However, I've found that the Media home page is taking...
  13. Hizen

    XF 1.5 Postbit/User info Query: Group and Member No.

    Hello XenForo, I want to edit the message user info area to add in new fields. I figured out custom user fields, but I want to display two things in the user block part: 'Group' and 'Member No.'. E.g. where the green arrow (above) is situated, it would read as follows. Joined: Posts: From...
  14. S

    XF 1.4 There is to remove such a query to all users from the user group?

    Is there such a query?
  15. Stuart Wright

    XF 1.4 I have 460,000 threads to move to a different forum. Can I do an SQL statement?

    Hi folks, we've got slow queries running because our classifieds archive forum has 540,000 threads. So I want to move the older ones out to a non-public forum. At the rate it's taking the system, it will take days. Can I just run a query to change the node id of the threads? Thanks
  16. E

    question about database query / Strings, arrays

    Hello, I am trying to make a own template and I wish to use an add-on to get own strings and few arrays but somehow I not get it to work correctly could someone maybe see what I do wrong? I created an addon by following this tutorial: Unmaintained - Global Template Variable the content looks...
Top Bottom