sql

  1. Orit

    XF 2.2 How to use the finder when joining tables?

    How should I use the XF finder with an sql query left joining 3 tables (I can join only 2 of them if it's simpler...)? I'm working on adding API endpoints to an existing add-on (I've already succeeded in doing it for another add-on) but have had a problem: I have 3 tables. One has events, the...
  2. RG70Hz

    New install on self hosted SQL server. Xenforo not appearing

    I set up a new Windows Server 2019 install on a home server. I have php 8.x.x (the latest available download) and MySQL server/databases. Everything is working as expected until I put my upload folder in my wwwroot directory. It will not let me access the files/pages for some reason. I get an...
  3. Mave

    XF 2.2 Small SQL question: Getting posts after certain date

    I've been using this query for years to get the number of posts made by myself in the past 365 days. It works great: $res = $db->query(' SELECT COUNT(*) AS total FROM xf_post AS post WHERE user_id = 1 AND (post.post_date >= UNIX_TIMESTAMP(CURDATE() - INTERVAL 8760 HOUR))...
  4. MercuGmes

    Not a bug SQL problems

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196 XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77 XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79 XF\Db\AbstractAdapter->query() in...
  5. PaulB

    Fixed escapeLike fails to escape backslashes

    Replacements it performs: % -> \% _ -> \_ However, it neglects to perform: \ -> \\ This means input such as this: \% Will become: \\% Which MySQL/MariaDB will interpret as a literal backslash followed by a LIKE wildcard. While this could theoretically result in security vulnerabilities in...
  6. Improvs

    XF 2.1 Sql query (finder) assistance

    Hello. Is it possible to add extra select sql to xenforo Finder query? For example, I have XF finder query like this: $BuyerFinder = \XF::finder('MK\Store:Buyer') ->with('Thread', true) ->with('User', true) ->where('stage', 'active') ->fetch($limit, $offset); I need to improve...
  7. vFranky

    XF 2.2 SQL-Statement to count Likes, not working with XF 2.2

    Hello, I like to count the likes from each user in 2021. In recent years, I used the SQL string below, which works fine. But this year, I get an error message "#1146 - Table 'wa9301_db18.xf_liked_content' doesn't exist". Was there any change from XF 2.1 to XF 2.2? Any idea or tips? Thank you...
  8. NandorHUN

    XF 2.2 What's the best way to manage two user groups in a forum? (Multiple solutions: which one is the best? )

    Hi Guys! I want to create a forum with two subgroups ( let's say group1 is "clients" and group2 is "partners"). I want them to have the same privivileges but group2 be able to access a different forum on different page. What's the best way to do it? I read about it so I have a lot of different...
  9. TheLifeGamingYT

    Two step verification clarifications

    Hi, I’m TheLifeGamingY, and I’ve been considering buying XenForo for my forum. I read that it supports two step verification, but I wanted just a clarification: with my previous free forum, I had two step verification issues, because I didn’t save the backup codes, so the only way to access the...
  10. E

    XenForo and SQL server 2017

    Hi ! I want to know if is possible to put a new installation of XenForo in SQL server ? I have a system, created in SQL server, so I want to put the existent users table in a new installation of XenForo. This is possible ?
  11. CMTV

    XF 2.1 Finder limit min value is 1

    Hi! AbstractAdapter class, line 560: public function limit($query, $amount, $offset = 0) { $offset = max(0, intval($offset)); if ($amount === null) { if (!$offset) { // no limit return $query; } // no amount limit, but...
  12. Moddis

    XF 1.5 Latest version of PHP/SQL compatible with 1.5 and 2.1

    I'm currently running Xenforo 1.5 with PHP 5.4 and SQL 5.6. I am testing an upgrade to 2.1 on the same server which recommends PHP 7.2. I'm happy to upgrade but don't want to break the production site if it is not compatible with the latest PHP version. What is the latest PHP version that is...
  13. C

    XF 1.5 Fatal error. Mysqli statement execute error : Out of range value for column 'referrer_id' at row 1

    This error appeared out of "thin air". I got to bed and woke up to this error. I have to say I'm on a fully managed server, so somebody most likely did something (they claim they didn't - until now). It's somehow related to the image proxy setting. You only see broken images in the threads, but...
  14. X

    Unmaintained Slow query logger 2.2.1

    Generates an error log entry when a slow query is detected. No configuration required. Once it has been running and reporting issues, I recommend disabling the add-on until you have pushed out fixes or understood why the previous logged queries are occurring. It is not recommended to leave...
  15. 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...
  16. arms

    XF 1.5 Error During Install - Laragon Apache version

    Using Laragon instead of XAMPP as it has built in support for composer etc and been working great for test installs for many different packages: flarum, wordpress, laverel But trying to install xenforo i'm getting the following error: for ref: php-7.1.1-Win32-VC14-x86
  17. S

    XF 1.5 SQL: Copying field value with conditional

    Hey guys, as most of us I´ve migrated from vBulletin to XenForo. In vBulletin we had a custom field in the db and I need those values now inserted into another field in the xf_user_profile (affected users: roundabout 40.000). I know that it´s totally out of the scope of a normal support...
  18. Michael Murguia

    XF 1.5 SQL Help - Adding Secondary Groups, and Upgrades

    Hi All! First, thank you in advance for your help! Below, the specific question is highlighted in blue! I think I am about half way through this project, and would love some help completing the task. Part 1 Adding a secondary group via SQL using an email list works fine like this: UPDATE...
  19. X

    Unmaintained Slow query logger 1.3.1

    Generates an error log entry when a slow query is detected. No configuration required. Once it has been running and reporting issues, I recommend disabling the add-on until you have pushed out fixes or understood why the previous logged queries are occurring. It is not recommended to leave...
  20. ForestForTrees

    Identify people who have recently added tags using PHPMyAdmin

    ForestForTrees submitted a new resource: SQL to identify recent taggers - Use PHPMyAdmin to identify your most active recent taggers Read more about this resource...
Top Bottom