Questions for mysql


How to figure out where this database insertion and retrieval is breaking?

Problem solved...variable undefined. I will add full answer when stackoverflow allows me to answer own question

MYSQL - Count all rows and return values based on frequency

I'm wanting to do a query that will count all the 'email' rows in my table and return all the values based on frequency. I don't want to group the results though, I want to show every variation of ...

Dynamically populate two dropdown menus

I'm not (as I am certain you'll notice below) a programmer or coder. I write network documentation manuals.

How can I segment a mySQL fulltext table?

I have a mysql table with fulltext. Every day its size will increase by 30K data items. I am afraid the query speed will decrease when the data size increases to many GB. My situation permits me to...

MySQL: adding current year as a default value for a field 'year'

I have the following table in MySQL (version 5):

Hibernate basic configuration in Spring 3 project - Class not found exception

I'm trying to set up Hibernate 3.6 in my existing Spring 3 MVC + Spring 3 security project. Nevertheless I keep getting java.lang.ClassNotFoundException in my HibernateUtil class - line with return...

Pulling a field from a Foreign Key into table

I'm having a bit of a brain fart here. I have a MySQL database with vehicle information. In it there is a table Vehicles, with a Foreign Key for VehicleMake and VehicleModel. I've decided to rem...

Zend Framework Database Transaction - Can't rollback

Alright, let me get this out of the way first. My question is similar to this:

Get distinct records with counts

I have a table with personid and msg colums.

MySQL- Unable to jump to row 0 on MySQL result index

I have got an old site that has recently been displaying an error which is weird as its been untouched for some time. I get the following:

Show cumulative totals in new column

I am working on a simple flow statement where the user inputs +ve and -ve values and they are stored in a single table.

Beyond MySQL docs, what's the best resource for understanding the interworkings of this RdbMS?

Focused like a hawk on getting the 80% of the core useful functions out of MySQL -- beyond MySQL docs, what's the best resource for understanding the interworkings of this RDBMS?

MySQL: mass insert new records or increment existing

I need to make something like this:

What happens if I drop a MySQL column without dropping its index first?

With one of my MySQL tables, I dropped column col1 before I drop it from a unique index (col0, col1, col2, col3) that contains it.

How to normalize or design my MySQL database

I want to know which one structure is good to store about 50 data in same time into MySQL?

Should I use flat tables or a normalized database?

I have a web application that I am currently working on that uses a MySQL database for the back-end, and I need to know what is better for my situation before I continue any further.

mySQL Stored Procedure : input paramrter passed to the show procedure

When I tested this script in the console, it is working.

Inserting variables into SQL query for node-mysql

In the wiki for node-mysql, I noticed that variables (kind of) were inserted into the SQL query in 2 different ways, one is by inserting a variable in the middle of the query string, and the other ...

How can pass value from MySQL to go template

This struct to pass value to template

Using subqueries with doctrine / Errors with aliases

I'm trying to make a simple query with a subquery in a orWhere clause (with Doctrine).

How can I get the rows from SHOW PROCESSLIST using MySQL Connector for .NET or Dapper?

I need to parse the running queries on my MySQL server. What is the easiest way to retrieve the result of SHOW PROCESSLIST from within MySQL Connector for .NET, or using Dapper?

mysql trigger not working?

I am trying to create a trigger to insert a new row conditionally based on an insert on another table...I can't seem to nail the syntax.

MySQL INSERT … SET … ON DUPLICATE KEY failing… puzzled

Can anyone tell me what's wrong with this query:

SQL Insert Into a MAX value

In SQL how would I insert into a MAX count of another column

user insert date in form

I have a form where the user needs to insert a date. This date is then used by the program to determine an expiry date. My question is, how is the best method for the user to insert the date in the...

SELECT records WHERE rows have difference on a specific column

I have a database table campaign_data. I need to select the customer_id where in the campaign there is difference in tariff. How can i do that with MySQL query. Here is some sample data.

How to model many-to-many relationships in MongoDB (for a MySQL user)

I come from a MySQL background and am trying to wrap my head around MongoDB. In particular, I'm struggling to conceptualize how I should model n:n relationships the "Mongo way."

php url parameters

I am working on my website, and I am trying to get the url parameter "page" which is an integer that tells which entry to read in the MySQL database that hols the HTML for all the pages. Here is my...

Can i delete an entry on multiple tables in one SQL query?

I have 5 tables in my database : Category1 , Category2 , Category3 , Category4 , Category5

Mysql - How to get a row number after Order by?

Let's say I have a table with the following columns:

Mysql Query to Calculate Total Products Sold by SKU

I haven't found a similar table structure in existing questions yet so I'm hoping someone may be able to help.

MySql insert with multiple values in a single query

I wonder if there are any advantage or disadvantage using multiples values in a single query, or whether is better to insert those values into a separate queries?

How to insert cyrillic simbols in mysql table?

I've created a table lets say Example. And insert values, as follows:

MySQL get missing IDs from table

I have this table in MySQL, for example:

Finding total number of rows of tables across multiple databases

I have 67 different databases and each database has more than one common table. One such table is company and I want to find total rows in that table from all the databases. How can I write a query...

MySQL LEFT JOIN Problem - Missing LEFT column

I'm having problems with an SQL query used to display custom profile fields and any (optional) corresponding values.

Is there a way to search all the tables in a mySQL database?

Basically I have a database full of tables and I want to go through them all until I find a result that matches my search query. Is there a way to do this? Or at least a command to return all of the

Register - Login Database Scheme

Here is what I want to ask:

Facebook app count top users

I'm using facebook requests in my app. Lets say for example i have a table like this in my db:

How to use values retured from mysql stored function with in() function?

I have a field named 'dealBusinessLocations' (in a table 'dp_deals') which contain some ids of another table(dp_business_locations) in comma separated format.

How to make a CSV upload perform faster?

I was wondering if any of you guys have tried something about CSV migration in a live form(multipart/form-data) mine is working the only thing I hate about is that it consumes so much of time and i...

Learning SQL: UNION or JOIN?

Forgive me if this seems like common sense as I am still learning how to split my data between multiple tables.

MySQL efficient “select id else insert” query

I have a MySQL table consisting of:

error php and mysql

<?php do { ?>

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.