MySQL is an open-source, relational database management system.
0
votes
0answers
10 views
mysql syntax error (phpMyAdmin\export.php)
When I import mysql.sql.zip file,I got following errors
<br /> <b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tried to allocate 128974893 bytes) in ...
0
votes
0answers
20 views
AJAX MySQL Query in PHP
I have the following code that works great at constructing a query where a column is NULL as well as a few other criteria. The only problem is that I need to allow for the SPG_Suppress column to be ...
0
votes
0answers
25 views
Insert Form into database
I'm developing a cms and am having trouble inserting items into a database. I believe the problems lies in the structuring of the entire cms (backend area). I would start by asking if there is a good ...
0
votes
0answers
15 views
MySQL update and Sum in Query
I have no idea How can it be done or is it possible In Query.
Here I have 2 tables.
Review
id pid published
-- --- ---------
1 12 0
2 14 1
3 16 ...
0
votes
1answer
19 views
MySQL/PHP; Fetch only attribute fields from a database without rows
I make a query that give me zero rows (ok: no row meets my select).
Is there a way to fetch only the attribute names, also if there is not any row with data?
$row_number = 0;
while ($row = ...
0
votes
0answers
7 views
Is there a way to restore previous (until last update) values in MySQL table?
Say, I've executed UPDATE table SET field1 = 'val1', field2 = 'val2' WHERE id = 5
Previously field1 was 'VAL1' (e.g.), field2 was 'VAL2'. Is there a way to restore them in this particular table (!!!) ...
1
vote
2answers
23 views
formatted output like this in python
Here is the python code with the query to the database
cursor.execute("""select count(distinct offering_name) as events
,count(learner) as learners
,count(distinct learner) as unique_learner
...
2
votes
2answers
33 views
Custom queries with Entity Framework 5 and MVC 4
The goal
Make custom¹ queries in an application who uses C#.NET + MVC 4 + Entity Framework + MySQL.
The problem
I want to perform a query and return the results to view, but I don't know how to do.
...
1
vote
1answer
16 views
Having trouble getting data with this inner join ( MYSQL / PHP)
I have 3 tables that I am trying to return a column from and it's making me cry why it's not working:
$projectId = 54971033
$id = 53189015
SELECT
iR.author,
...
0
votes
0answers
9 views
EF 6 + DevArt Mysql connector + MONO
It is my first expirience to deploy .net on debian. My app was created and test in win 7 vs2012 using Devart mysql connector by using database first method, after that i was started to deploy it on ...
0
votes
1answer
42 views
How to get the formated output in python like this
Here is the python code with the query to the database
cursor.execute("""select count(distinct offering_name) as events
,count(learner) as learners
,count(distinct learner) as unique_learner
...
0
votes
0answers
38 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 ...
1
vote
2answers
19 views
Visual Basic fetching data from mysql table
I'm trying to fetch some data from table and get error:"Invalid object name 'h'".My code is
Dim h As Decimal
'some code
cmd2 = New SqlCommand("insert into h select KvotaX from dbo.Utakmice where ...
1
vote
0answers
25 views
SOURCE error 2?
When i try to source an sql file i get the error:
mysql> source C:/Users/tom/Documents/insert.sql
ERROR:
Failed to open file 'C:/Users/tom/Documents/insert.sql', error: 2
I have checked the ...
1
vote
2answers
50 views
SUM on calculated field is doubled
I have an invoices table. Each invoice has many invoice_items and transactions (or, if you prefer, "payments"). For each invoice, I want to calculate the paid amount (i.e. the sum of its ...
1
vote
2answers
37 views
MIN/MAX price for each product (query)
The goal
Select MIN/MAX price of each product in database.
The problem
I am able to get only products with specified identifiers.
What I have
I'm using MySQL and I have the follow query:
SELECT ...
0
votes
1answer
16 views
Preventing queries caching in MySQL
I'm using the tomcat connection pool via JNDI resources.
In the context.xml:
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"
username="myusr" password="mypwd" ...
0
votes
0answers
10 views
Nested Permissions
i am working on an crm system right now and want to check if the user has the correct permissions to start an action.
My resource-table looks like this:
CREATE TABLE IF NOT EXISTS ...
0
votes
0answers
7 views
Reference multiple php defined mysql queries with multiple .js divs
First, please excuse my general noobness. I will probably use incorrect terms but will do my absolute best to explain this in a coherent way.
So I am doing basic mysql data retreival and display ...
0
votes
3answers
28 views
Query not working properly
What I want is if do not pass any values to the variable then it should show all the values from the table while if I pass a value to variable then it should data on filter of that parameter.
SET ...
-3
votes
1answer
22 views
How to place all query in single fine and acess them in various template of front and and backend using php [closed]
I have made simple shopping cart i have used several queries but every time i take new template i need to include config file and write query="select * form" etc. is there any way to place all query ...
-1
votes
2answers
20 views
PHP PDO Binding part of the sql statement to something
Why can't I do something like this (this is inside a function):
switch($a) {
case 'userStatus':
break;
case 'userCanEdit':
break;
case 'userCanView':
break;
default:
echo 'Unable to identify ...
-2
votes
2answers
31 views
How to select all movie been made after 1980 and have more than 20 actors
I need help with a mySQL query.
CREATE TABLE `actor` (
`id` int(11) NOT NULL default '0',
`name` varchar(35) default NULL,
PRIMARY KEY (`id`),
KEY `actor_name` (`name`)
);
...
0
votes
0answers
15 views
convert from MongoDB to mysql (only one table)
I got one table on MongoDB , but I like to have the same information on a mysql table , because my client only reads mysql. what do you advise to do ?
and what method or command do you advise to ...
1
vote
2answers
23 views
Mysql if entry exists
Is there a possibility to check if record exists using mysql?
rowName | number
----------------
dog | 1
cat | 2
For example:
If i have a variable $var = 'dog', which already exists in my ...
-7
votes
0answers
52 views
how can I get my website automatically make function over a period of time [closed]
I want my website to be able to switch rows in the database from one table into another is that possible ?
0
votes
3answers
36 views
What causes a Fatal error: Call to undefined function mysqli_report()?
I'm trying to instal vBulletin 5 Connect and when trying to access the install.php file i see an error:
Fatal error: Call to undefined function mysqli_report() in
...
1
vote
0answers
14 views
Using the minus sign on multiple-words in full text boolean mode
I am just doing a bunch of testing with mysql's full text boolean mode and from my testing it doesn't seem you can use the minus sign on multiple words?
I have two rows for example..
id,name
...
-5
votes
1answer
45 views
Edit huge Database locally [closed]
I downloaded the database from a live website, I've to move it on a local machine and work on it there.
I need to edit and remove some lines from a 10GB MySql database before uploading, because when ...
0
votes
0answers
15 views
MySQL Connection Method
I'm working on a website that interacts with the database several times on a single page. At the moment, I'm opening a connection once at the top of the script and closing it after every query(at the ...
-6
votes
1answer
36 views
Create a code for domain names search [closed]
I am searching a code for domain name search tool for my website but i can't find it.
is it possible to create own domain search engine tool for my website.
give me some example sites.
Thanks in ...
-3
votes
3answers
42 views
UPDATE array data in PHP MYSQL [closed]
i am unable to update my table after submitting array data.
ex:
1. Product Name: DELL 329 Quantity :5 Rate :2500 Amount :12500
2. Product Name:Dell 21 Quantity :8 Rate :1800 Amount :14400
but ...
-5
votes
3answers
44 views
Unable to connect to the Database MySQL using PHP [closed]
I enter some name in the Text Box and i click on Submit button. Whenever i clicked Submit button the Text in the Text Box will store in the MySQL Database but it Won't store but it redirected to PHP ...
0
votes
2answers
18 views
Can't connect to remote mysql server from rails
When I run:
bundle exec rails c
I get
Mysql2::Error: Access denied for user 'root'@'$HOST' (using password: YES)
despite the fact that this works just fine:
mysql -h $HOST -P $PORT -u root -p
...
0
votes
1answer
9 views
Spring security login point to mysql database and other fucntionality should use sql server database
In my project i want to make spring security login functionality to point to mysql database and other functionality of my project is running in sql server how can i make spring security login ...
0
votes
0answers
29 views
show indicators based on count of rows
Here's my mysql query
mysql_select_db($database_advanced, $advanced);
$query_bannerframes = "SELECT * FROM banner_frames WHERE FIND_IN_SET($bannerpageid, bf_relatedID) AND bf_live = 1";
...
-2
votes
2answers
32 views
mysql_fetch_array and while loop in php [closed]
I'm trying to get data from DB and print it on the page. I use next select:
$tableIndex=mysql_query('SELECT table_index FROM table_names');
When I use a while loop to print, it's ok.
Code:
...
-2
votes
2answers
28 views
How to update table value based on the time line
Can anyone please suggest me the best approach for my requirement? I need to automatically update the table value after some specified time, using Java and MySQL as the database.
-1
votes
1answer
45 views
how replace existing image in PHP?
I'm having a difficulty on how to replace the image on my folder and database.
I don't have the slightest idea on how to code it. Can somebody help me?
My code is like this.
if ...
0
votes
0answers
17 views
Converting MEMORY based tables to INNODB Engine
Magento has some MySQL tables that make use of the MEMORY engine e.g. catalog_product_index_eav_tmp
However, since we make use of AWS read replicas, any time our master instance is restarted (and ...
0
votes
1answer
19 views
Getting brackets while executing query into mysql database using python
I need help!! I have written a python code which queries the database and prints the result in the Linux shell prompt here is the code :
#!/usr/bin/python
import MySQLdb
import sys
import config
...
0
votes
0answers
21 views
MySQL messages model query + last in group
Here is my simpled messages DB
id | from_id | to_id | created_at
So i have query to get dialogs list (here i get only coll from results- the last id of last message with collocutor):
SELECT ...
0
votes
0answers
30 views
Levenshtein distance combined with SQL LIKE
I'm trying out functionality of
Levenshtein: MySQL + PHP
However my query doesn't return results:
SELECT * FROM products WHERE levenshtein('%".$search."%', `name`) < 5 OR ...
0
votes
2answers
42 views
Interactive jquery/php/mysql calculator - is this feasible?
So I don't program regularly and it's been a while since I did anything. In any case I've been asked to explore this calculator web app and see if I can execute it. So far I've been exploring the ...
0
votes
0answers
11 views
mysqlpp String overload
I'm new to mysql programming, so this maybe an newbee-question, but I did not find answers. We have a own String-class and used the borland sqlplus-class before. Now we want to use the mysqlpp-class. ...
-5
votes
0answers
20 views
Update database when user close the brower in php [closed]
Update Database when user closes the browser.Am tried with Ajax.
But not Updating the database.
0
votes
4answers
29 views
Number of lines updated [duplicate]
Good morning,
Is it possible to get the number of rows modified by an update in MySQL using a MySQL command?
I found this post but I didn't understand
MYSQL number of records inserted and updated
...
0
votes
0answers
12 views
Using several timestamps in MYSQL \ Working with date zones
I need to keep track of three dates in my table:
- created_at
- started_at
- finished_at
In the future I plan to make my scripts work with any time zone. As I know when I use timestamps they can be ...
0
votes
1answer
23 views
Fail to call mysqldump from java in linux
This is the code :
public static File backupDB() throws IOException {
File file = null;
file = new File("BKUP_DB_"
+ Calendar.getInstance()).replace("/", "-") + ".sql");
...
-3
votes
0answers
21 views
Cannot retrieve data from mysql database
My MySQL database name is "weddingdbase" and tablename is "weddingtable". I already created the database and inserted the data's. And the column names in my database are fullname, date, comment, ...