0
votes
1answer
14 views

Insert into table forcing new primary key

In MySQL I want to duplicate a couple of records but because there are are large number of columns I don't want to list every single column name from the table in the insert. I tried doing an INERT ...
0
votes
1answer
27 views

mysql query runs fine in editor, won't run from PHP webserver

This query works perfectly from my mysql editor: INSERT into brokercomps2 (company, memnumbers) SELECT employee.company, count(*) FROM employee, brokercomps WHERE employee.company = ...
0
votes
1answer
30 views

PHP/MySQL syntax to insert into multiple tables (many-to-many structure)

I am trying to insert data from one form into multiple MySQL tables (using MYSQL syntax, although I will be migrating the application MYSQLi at some point - this probably isn't relevant right now, but ...
1
vote
3answers
19 views

How to display errors for my mysqli query

I am using the following script to process a form that I add info to my website with, the problem I am having it when I press submit nothing gets submitted to the database, also there are no errors. ...
0
votes
0answers
20 views

MySQL Connector/Python - insert python variable to MySQL table

I'm trying to insert a python variable into a MySQL table within a python script but it is not working. Here is my code add_results=("INSERT INTO account_cancel_predictions" ...
0
votes
1answer
19 views

New entry in junction table but avoid duplicate in table

I have three tables, Table1 has id(pk) and name Table2 has id(pk) and category Table3 is a junction table and has id(pk) and two foreign keys: table1_id (pk from mentioned table1) and table2_id (pk ...
1
vote
1answer
19 views

MySQL InnoDB: Best practice bulk insert

I am trying to insert 2x 700 000 records into an InnoDB table and it is in my opinion rather slow. I have tried several things and I am not sure what is the best way to achieve the most efficient way ...
0
votes
0answers
42 views

Mysql update on insert

Hopefully this is a quick question that only needs a quick answer. I have two tables, the first is populated using a csv and Load data infile script with replace syntax. I am then running an insert ...
0
votes
1answer
32 views

creating very large mysql INSERT query efficiently with C API

I got data in files, which I need to write into a database. I have tried a NoSQL solution, which results in extremely high memory usage. Now I'm trying to get the same thing to work in MySQL using the ...
1
vote
1answer
28 views

MAX in SELECT statement

username level me 1 you 1 me 2 me 3 you 1 I want to get the highest value for each username. So it should give me 3 for 'me', and 1 for 'you'. How do I ...
0
votes
1answer
22 views

Having Trouble Inserting Array Possibly Due to Table Structure

Here is a screenshot of the table structure: https://docs.google.com/file/d/0By2lFlhEzILjYlM4SjdhdFNpbk0/edit?usp=sharing When I am attempting the following INSERT INTO sql command of an array, I ...
1
vote
1answer
28 views

Populate a table with random set of rows from another table on insert using a trigger

I got this problem. I have a mysql database with this tables: USERS(Cod,Interests) SURVEY(Cod,Target_Interests) USERS_OF_A_SURVEY(CodSurvey,CodUser) with Interests having the same set of values of ...
0
votes
1answer
31 views

MySQL inserting ID into multiple Rows

i got the following insert-command: INSERT INTO PERSON ('Name','Age','Filename') VALUES ('Max',12,'Max_ID_.pdf'); i want to insert instead of 'Max_ID_.pdf' the string concartenated with the ...
3
votes
4answers
75 views

MySQL optimizing INSERT speed being slowed down because of indices

MySQL Docs say : The size of the table slows down the insertion of indexes by log N, assuming B-tree indexes. Does this mean that for insertion of each new row, the insertion speed will be slowed ...
0
votes
1answer
32 views

MySQL trigger changes in a table

I want to log any UPDATE on any table using mysql, but within the log I want to record the 'old' value and the 'new' one. For instance I have this table: user: +-------------------+ | id ...

1 2 3 4 5 123
15 30 50 per page