Skip to content
Advertisement

Tag: mysql

How to Update table row using regex

I have a table with rows like this: and I want to update my rows to keep only normal data and delete data inside “()” I’m wondering if there is a way to use regex inside my SQL update statement to delete all data after ” (” Answer You must use 2 SUBSTRING_INDEX like this if there also some data

Use UNIX_TIMESTAMP on update instead of timestamp

I want to add a column with a unix timestamp to see when the row was last altered. So far i could only figure out how to add a column with timestamp format. Is there any solution to use a unix timestamp – something like this: UPDATE: similar question As far as i understand this thread only shows how to

Alternative to BigQuery for medium-sized data

This is a follow-up to the question Why doesn’t BigQuery perform as well on small data sets. Let’s suppose I have a data-set that is ~1M rows. In the current database that we’re using (mysql) aggregation queries would run quite slow, perhaps taking ~10s or so on complex aggregations. On BigQuery, the initialization time required might make this query take

About set id=1 and password = ‘ ‘ in the SQL injection [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago. Improve this question Here is certain expert’s code: https://github.com/DalerAsrorov/Security-Flaws-And-Their-Prevention/blob/master/SQL%20Injection%20Prevention/FCCU.php#L34 In this example, at first line 34 and 35 doesn’t exist. So, it have one bug as described here:

Mysql Sum daily totals into weekly totals for given date range

Currently my db table has dailTotal values for every single day, I need to get these grouped into weekly totals. Is it possible to add the daily totals up into weekly totals and display a row each weekly total between the given date range. Im not quite sure where to start with this one. My current query to get is

Advertisement