In database table not insert data(img) above number of 20 [closed] - php

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 3 days ago.
Improve this question
I'm creating a database table for images, but when I am going to insert data(img) above 20 then I can't able to insert data. My table rows only able to insert data only 20. I want insert data number of 30 or 50. So how can I fix this problem.

Related

I'm using stored procedure in phpmyadmin to calculate fine for library management system [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 2 years ago.
Improve this question
CASE
WHEN DATEDIFF(CURRENT_DATE,books_transaction.date_out)>10
THEN UPDATE books_transaction SET books_transaction.fine = 50
ELSE UPDATE books_transaction SET books_transaction.fine = 100
END CASE;
END
ERROR #1054 unknown column 'date_out' in 'field list'
UPDATE books_transaction
SET fine = CASE WHEN DATEDIFF(CURRENT_DATE,date_out)>10
THEN 50
ELSE 100
END;

Mysql : duplicate last record every minute [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
I want to duplicate the last record in my table every minute, i'm using php and mysql.
I can use a cronjob to run it every minute, i know how to do that.
But i don't know how to duplicate the last row, i only have an id that auto_increment and value column.
For example :
Id, Value
10, Green
11, Green
12, Green
13, Green
I think select into is what you are looking for.
https://www.w3schools.com/sql/sql_select_into.asp

SELECT with a chance of showing [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So I have this database:
John 4.2
Robert 6
Maria 3.2
What I would want is lets say I refresh a website. And in every refresh I will get a random name from that database based on the chance of showing-> that would mean that Robert would appear more times than the other people(because of his chance)
Any way to do this? I just can't think of anything.
I've create your table with columns name and weight.
The following request return on name, depending on the weight:
SELECT name FROM table ORDER BY RAND()*weight DESC LIMIT 1;

MySQL select from users where there are more matches [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to know how to choose the users that have the highest number of columns to match the columns of the logged in user.
order by sum matches conditions ex:
SELECT * FROM table where fColumn = 'name' and column2='value2' or colmun3='value3'
ORDER BY (
(column2='value2') + (column3='value3')
) DESC

Get the closest value of a column in MYSQL [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 7 years ago.
Improve this question
I have a table that have a CP value (numeric), for example, 28030, 28060, 27100 etc. And the user can introduce a number via PHP. I want to, having this number for example, 28050, order in MYSQL my table putting 28060 as the first position.
This is the basic of my table:
SELECT * FROM `tiendas` ORDER BY `CP`
ABS() will work. Here's a query that does the job:
SELECT
CP
FROM tiendas
ORDER BY ABS(CP- 28050) ASC

Categories