mysql

how to implement a timer in a vk bot

I need to implement a temporary ban. I work with MySQL. Code execution occurs after a new event from LongPoll import vk_api ... 8' wait = 25 longpoll = VkBotLongPoll(vk, group, wait) for event in longpoll.listen(): #Вот здесь надо что то придумать

How do I display events by day, starting from today?

I have a database with these fields: id - id, title - title, startdate - start of the event, enddate - end of the event ... ent), this is the event should also be output. A search on this site and on others yielded nothing. I would be very grateful.

How to join multiple rows in a table into one

There is an sql query select oi.order_item_name , oi.order_item_id, oim.meta_key ,oim.meta_value from idlf.wp_woocomm ... of the request is as follows How do I make _product_id, _qty, and _line_total appear on the same line for the same product?

MySQL Type Conversion

Tell me why SELECT CAST(12 AS CHAR) +'12';//24 SELECT CAST(12 AS CHAR) +cast('12' AS CHAR)";//24 How do I convert to a string??

Find out the ID (AUTO INCREMENT)

Hello. There is a MySQL query: $mysqli->query("INSERT INTO `test_table` (`name`) VALUES ('test')"); Structure of the test ... is, the ID will be set automatically for this request. How do I know it? That is, I need to find out the Id that was set.

Date in the MySQL database from DateTimePicker

In DateTimePicker1 from MySQL, the date is formatted and flipped automatically by the query: ...DATE_FORMAT(`from_date`, "%d. ... general, I moved away from the topic of the question. What should I do? How to write a date from a datepicker to the database

MySQL Navicat Lite-connection error

I'm starting to learn MySQL. When trying to connect, it returns the error: 2003 - Can't connect MySQL server on 'localhost' T ... se on the computer. MySQL was installed like this, just downloaded the archive from the official site and unzipped it to D:\

Problems with TimeZone when connecting MySQL to intelijiIdea

Created an empty project in intelijiIdea "Hello, Word", decided to connect to the server via the side panel DataBase - > + ... stackoverflow, but everything is unchanged. Workbench version 8.0 MySQL version 8.0 IDEA version 2019.1.3 Java version 12.02

User ID in the URL

There is a USERS table in MYSQL, where each user has its own ID. You need to make sure that when a user logs in to their account, the URL contains the string http://suite/$id, where $ID = user ID. I can't think of how to implement it...

which sql query is faster CASE WHEN THEN or ELT

Can you tell me which sql query will be executed faster - using CASE WHEN THEN or with ELT? There is a heavy, even very heavy ... t ... SET column=SET WHEN ... THEN ELSE column END. Very large and extremely slow to execute. Maybe using ELT will go faster?

Product categories Laravel

Hello everyone. I'm doing a training project on Laravel, I don't have much experience yet, I need advice on solving the probl ... le on the However, they should only be displayed when the user clicks on Крупная бытовая техника , etc. Thank you in advance!

mysql how not to list all fields if you need 1 field to change when SELECT

Hi. Can you tell me if it is possible not to list all the fields if 1 field out of 20 needs to be slightly changed during the ... t would not write a request of this kind: SELECT bla, bla, bla, bla, SEC_TO_TIME(duration_seconds), bla, bla, .... FROM ...

Error Fatal error: Cannot redeclare please help

There is such a function <? $message_query= mysql_query("SELECT u.id,p.*,u.username,u.family,u.avatar ... } return $timeCalc; } ?> Но почему то выдает ошибку подскажите пожалуйста в чем проблема?

MySQL #1292 - Truncated incorrect DOUBLE value

I address the database with the query UPDATE `departure` SET `register_pay_id` = '77' WHERE `author` = '15' ... are the same field names register_pay_id? How is this possible to solve? For info in register_pay_id values of varchar(255)

Two databases of the same project, is it appropriate?

Faced with the problem of storing application data. There is a WEB (written in PHP) version and there should be a windows / a ... ?json on the server or is it better to write all the data to mysql and then convert them to json format for the application?

How to insert images into a table using a database?

I just know how to insert text. What about the pictures?

An ampersand in a mysql regular expression?

Tell me how to make the following query work: select * from test_list where request REGEXP '[[:<:]]test and test (test & test)[[:>:]]'

Filter products in the online store

Guys, the database has a table with the name of the filters - sorting (fields: id, title), with filter items - options (field ... ted items in filters, they can be from the same filter or from different HAVING cnt = 2 indicates the number of filters used.

How to implement the main news parser in python?

Good afternoon, everyone.Tell me how to implement the main news parser of the news portal.So that all the main news of this s ... (array[2]) textp=array[3] cursor.execute(sql,(str(title),str(text),str(date),str(textp))) print ("Connect successful!")

Error executing the request

There is a request: SELECT lichniy_nomer, MAX(`sum`) FROM ( SELECT lichniy_nomer, SUM(narushenie.shtraf)'sum' FROM protocol, ... mount). However, the error appears: #1248 - Every derived table must have its own alias. I can't figure out how to fix it.