Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Can someone provide a delete query to delete older records(older than 5 days)for the below mysql tables with references, without corrupting my existing data.
    I have no clue to write a coordinated delete query (deleting multiple tables in same query)
    Hello room.. :smile:
    أحمد عاكف
    Why sqlite isn't a server and every dbms else is a server ?
    Why we need do start this server and stop
    Why mysql isn't just files
    I have 2 columns that have time data that looks like "2017-12-06 18:50:27 +0000" . What mysql function can I use to get the difference in HOURS of the 2 date time strings? I tried DATEDIFF(time_string_1, time_string_2) but it isn't working. What else can I use?
    Hi any website where I can get all MySQL queries like trigger,cascade etc. Please share with..... Thanks
    I want connect mysql 8.9
    but i get this error:
    mysql 8.0, not 8.9
    Hi Guys , I have the problem with mysql cluster.When insert or update data in some table with many registers. Get the error #1114 the table "xxx" is full. Has someone happened to you?
    @wuxiaolan91 try $ npm install @mysql/xdevapi this driver
    Sarit Vakrat
    Hi, im using mysql-promise and when I close the pool the node process never closes, any ideas?
    Hi everyone I havent used gitter much I need a little mysql help and Im not sure what Room to join
    vijendra singh
    vijendra singh
    how to add integer when 2 string collides
    any help

    This is my model.js

    module.exports.getUser = userId => {
      const sql = {
        sql: "SELECT * from user where user_id=?"
      const sqlParams = [userId];
      connection.query(sql, sqlParams, (error, results, fields) => {
        // Handle error after the release.
        if (error) throw error;
        return results;

    this is my service.js

    module.exports.getUser = () => {
      let user = User.getUser(1);
      return user;

    But in my service.js file its coming as undefined but in model.js (inside the callback) its printing the results correctly.

    how can i pass this results back to the calling method in service.js

    Please help
    Hi, i did that using Q library, anyone else has better approach
    Abhinav Taneja
    hi there I'm having an issue creating and inserting into table from terminal but can do it from workbench
    It should be a syntax problem but i think i'm using the correct syntax
    can anyone help?
    @abhinav2196 share your DML.
    lokendra singh chouhan

    hi there, i had a problem with my sql, it's simple but i can't figure out why it can excute sometimes but offten can't excute successfully.

    DELETE FROM general_log where sqltext='SET NAMES utf8' LIMIT 240

    the error is

    [Err] 1206 - The total number of locks exceeds the lock table size
    already done with that issue, thanks.
    Syam Danda
    Hi everyone, check this repository if someone is looking to have web based tool to access your mysql database.. or you guys can contribute for quick releases.
    Hi, Can someone help me out with this query?
    CREATE TABLE nflfeedjoblog (
    BatchId int(30) NOT NULL AUTO_INCREMENT,
    processDate datetime DEFAULT NULL,
    status smallint(6) DEFAULT '0',
    pmid int(11) DEFAULT '0',
    NFLTransactionId int(30) DEFAULT '0',
    PRIMARY KEY (BatchId),
    KEY NewIndex1 (BatchId,NFLTransactionId),
    KEY NewIndex2 (processDate)
    I don't understand what "KEY NewIndex1 (BatchId,NFLTransactionId)" tjhis does ?
    Sorry if this sounds dumb but Im fairly new to databases. Thanks in advance.
    Emiliano Heyns
    Is this proper for for IN queries: 'DELETE FROM items WHERE itemKey in (?)', [['a', 'b']]), or should I use 'DELETE FROM items WHERE itemKey in ?', [['a', 'b']])?
    lokendra singh chouhan
    Emiliano Heyns
    I'm well aware of those, which is why I want to use parametrized queries, I just don't know a) whether mysqljs supports array values, and b) whether I should use IN ? or IN (?) when I use them.
    Alexander Tunick

    Hi guys! Having made a simple query with count() operator i'm obtaining badly formatted response where the value's name in object is a part of my query that looks stupid

    [ RowDataPacket { 'count(distinct `jpp`.`job_position_id`)': 10 } ]

    could I somehow change it?

    it would be great to have something like:
    [{'result': 10}]
    [{'': 10}]

    hello everyone, /\

    I'd like to make an app with nodejs, mysql

    1. what driver/module should I use ?
      (if mongodb, I use "mongoose")

    2. I'd like to deploy it to heroku, where should I host the database ?
      (if mongodb, I use "mlab")

    thank you very much for the guidance

    Why this sql cannot run ?
    select * from project_application_records par inner join (select * from project_version pv where pv.project_id = par.project_id order by version desc limit  1) as prv
    Here is the error
    [42S22][1054] Unknown column 'par.project_id' in 'where clause
    Here is the table struct
    id    bigint(20)    NO    PRI        auto_increment
    application_info    json    NO    ""        ""
    application_method    int(11)    NO    ""        ""
    created_at    datetime    NO    ""        ""
    process_instance_id    varchar(255)    NO    ""        ""
    status    int(11)    NO    ""        ""
    updated_at    datetime    NO    ""        ""
    dynamic_form_id    bigint(20)    NO    MUL        ""
    project_id    bigint(20)    YES    MUL        ""
    user_id    bigint(20)    YES    MUL        ""
    real_time_application_status    varchar(255)    YES    ""        ""
    lokendra singh chouhan
    Different Types Of SQL Joins https://www.technolush.com/blog/sql-joins