MySQL is an open-source, relational database management system.
0
votes
0answers
3 views
Data locking prevents query from running - MySQL InnoDB
We need to run a script every 24h that calculates sums & avarages of data from 1 big log table and updates the data in the Main_Table (Innodb) that has many select queries all the time (about 1 ...
0
votes
1answer
11 views
SQL query on the same table with join and group by
I've a problem with this query:
SELECT source.cod,source.nome,source.ruolo,SUM(source.giocato),ROUND(SUM(source.fvoto)/SUM(source.giocato),2) as ...
0
votes
2answers
16 views
how to automatically repair table if crashed
sometimes if a table is marked as crashed, a simple
REPAIR TABLE `tablename`
works fine to continue.
how do I add an automatic repair in my PHP script?
I get the error:
1194 - Table ...
0
votes
3answers
33 views
Query is taking too much time
I want to take your ideas regarding the below query:
select a.expense_code, a.expense_date, a.expense_supplier_code, b.supplier_name, a.expense_discount, a.expense_payment_method, ...
0
votes
2answers
13 views
Warning: mysql_query() expects parameter 2 to be resource, boolean given in C:\wamp\www\pyrll\emlhome.php on line 15
I've tried other answers similar to mine but in vain.
Here is the code.
<?php
session_start();
$con=isset($_POST['con']);
include("header.php");
include("dbconnection.php");
$logindt = ...
0
votes
4answers
26 views
Calling MySQL data into a drop list
So here's my problem. I have a table on a database name 'countries'. It has two columns: 'countries' and 'id'. I am trying to take the data from this table and put it into a drop box for a ...
0
votes
1answer
10 views
How to do SUM aggregate and put it in new column as grandtotal in MySQL?
This what my table look like:
id amount price
5 2 10
8 4 30
5 3 20
this is my desired result:
id ...
0
votes
0answers
6 views
Dynamic Query in Stored procedure of mysql call giving error as Truncated Incorrect DOUBLE value
this is Procedure:
delimiter $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `SampleSP`(IN uname VARCHAR(50),OUT uid VARCHAR(50))
BEGIN
DECLARE sqlcmd VARCHAR(500);
set sqlcmd = 'SELECT userid into ...
0
votes
3answers
11 views
How to search for a date in timestamp field?
I have a database and a table with below attributes:
Column: Date
Type: TIMESTAMP
Attributes: ON UPDATE CURRENT_TIMESTAMP
Default: CURRENT_TIMESTAMP
So each data will showing up in this format: ...
0
votes
1answer
11 views
Pycharm: cannot connect to local MySQL database
Database used to work normal, the connection error happens after I configure remote server, don't know if it's related.
Database URL ("my" is db name):
jdbc:mysql://localhost/my
When test ...
0
votes
1answer
11 views
Installing Django: Using XAMPP's MySQL, MySQL-python 1.2.3 & 1.2.4 errors?
I am following this awesome walk-through on how to install python.
I don't think I have a real problem as ...I think I'm able to work on my django project... however I ran into a couple errors that I ...
1
vote
0answers
12 views
Building a ScreenShot Gallery with Twitter Bootstrap
I am currently in the process of trying to build a screenshot gallery. I have complete the first step which is to make it possible for the user to upload the image to a mysql database.
That is how ...
0
votes
1answer
16 views
Recommended column type for 32 character long string (php session id)
My php.ini is configured to generate 32 character long session ids with following settings:
session.entropy_file = /dev/urandom
session.entropy_length = 512
session.hash_function = 1
...
1
vote
2answers
44 views
Query does not get data from table
My problem is that when I run the query in MySQL directly it works:
SELECT * FROM SubCategoryLookup WHERE LinkedCategoryID = '4' AND OrganizationCode = 'ibm'
While using PHP, if I give any ...
0
votes
1answer
19 views
Difficulty in writing Stored Procedure in MYSQL
The code my Stored Procedure is:
CREATE PROCEDURE insert_sait_inf(IN name TEXT,IN title TEXT,IN link TEXT)
BEGIN
INSERT INTO sait_inf(sait_name,sait_title,sait_link) VALUES (name,title,link);
...