mysql

java jdbc mysql connector: how to resolve disconnection after a long idle time

Hiya. I'm using red5 1.0.0rc1 to create an online game. I'm connecting to a MySQL database using a jdbc mysql connector v5.1.12 it seems that after several hours of idle my application can continue running queries because the connection to the db got closed and i have to restart the application. how can I resolve the issue ? Kfir ...

select all events within the next hour.

Hi. In my MySQL database, there is a table, where I store daily recurring events. I store the time of the event in the field time, that has the 'TIME' type. How do I select all events within the next hour? ...

Does unused database hurt MySQL server performance in any way?

If there are some unused databases on MySQL server is it better to remove those from server? ...

Getting a next week date

Using MySQL ID Date 001 2010-08-01 002 2010-08-15 003 2010-08-22 ... .... Query select ID, Date from table where date < curdate + 7; The above query is not working, it showing error. How to get date upto nextweek date, I don't want to mentioned the date, it should calculate the systemdate + 7 days. For Example Today is 2010-0...

SQLite concurrency issue a deal breaker?

I am looking at databases for a home project (ASP.NET MVC) which I might host eventually. After reading a similar question here on Stack Overflow I have decided to go with MySQL. However, the easy of use & deployment of SQLite is tempting, and I would like to confirm my reasons before I write it off completely. My goal is to maintain u...

mysql pagination with multiple tables

I have 2 two tables: organisations (id, name) organisationsmeta (id, orgId, metaKey, metaValue) Each organisation can have multiple associated meta rows. I'm using a Left Join right now since there can be organisations without any meta data. How do I construct the query to fetch 10 organisations (with all associated meta data), regard...

Rails: Using named_scope which triggers a MySQL "in"

PROBLEM: I want to run a query which would trigger something like select * from users where code in (1,2,4); using a named_scope. WHAT I TRIED: This is for a single code: named_scope :of_code, lambda {|code| {:conditions => ["code = ?", code]}} I tried something like named_scope :of_codes, lambda {|codes| {:conditions => ...

Why doesn't MySQL include a decent migration tool anymore?

MySQL used to have a Migration Toolkit, to make it easier to import from SQL Server and get started with MySQL as a production platform. That has been discontinued as a product. We were promised that an equivalent product would be added to the newer MySQL Workbench, but that has not happened. It strikes me as a bizarre business decisio...

Turning multiple dbms query responses into the same type of variable (PHP)

I am making a function (PHP). In this function it basically uses the dbms specified and connects, submits the appropriate query, <insert my problem here>, and disconnects. DBMSs include MySQL, MSSQL, Postgres, and Oracle. I am assuming that outside of this function, the user would not have access to specified DMBS, so whatever results I...

Cakephp model associations and amount of mysql queries they require

I have a rather simple data model, but I have a centric entity called "item" which is associated to 7 other entities via 1-to-1 / 1-to-many relationships. Everything works smooth. But in most actions that work with the item model, I dont need any of the associations from the item Model - so mysql ends up issuing a many unnecessary querie...

Suggested DB Schema for Quotes

How would you save the quote products in a database? Serialize data? http://cl.ly/6419969e30cd26e2f32a They can create however many rows they want... It's for a quote system. Create a quote with however many products. I need to save X Product At X Qty and X Price foreach one. Serialize in the only thing I could come up with, but I hat...

Which RDBMS has the richest super-set of ANSI-SQL?

Back in 1989, when I used to program with Oracle 5.2.3 on UNIX and VAX/VMS platforms, I considered SQL*PLUS as having the richest super-set of built-in functions. ORACLE*FORMS also had the ability to embed SQL statements within triggers. That was then, 21 years ago. At present, which other RDBMS' have come close, have the same, or more f...

MYSQL: comparing a NULL date to CURRENT_DATE

I have a MYSQL table with news articles with the fields "date_start" and "date_end" to indicate which news to show on a web site. Articles are public if date_start is before today and the date_end hasn't already gone by (after today). The problem: I'd like to let the admin leave date_end NULL if the article is of permanent nature and do...

MySQL: How to get a sequential number with rows?

How can I number my results where the lowest ID is #1 and the highest ID is the #numberOfResults Example: If I have a table with only 3 rows in it. whose ID's are 24, 87, 112 it would pull like this: ID 24 87 112 Num 1 2 3 The reason why I want this, is my manager wants items to be numbered like item1, item2, etc. I initially ...

Help with MYSQL query

In the table below +-------+-----------------------+ | id | timestamp | +-------+-----------------------+ | 1 | 2010-06-10 14:35:30 | | 2 | 2010-06-10 15:27:35 | | 3 | 2010-06-10 16:39:36 | | 4 | 2010-06-11 14:55:30 | | 5 | 2010-06-11 18:45:31 | | 6 | 2010-06-12 20:25:31 | +---...

CodeIgniter: Encrypt communication between app and mysql db on different servers ?

Can anyone tell me the best way to encrypt data between a CI application and a MySQL db hosted on separate servers. SSH tunnel? If so, has anyone gotten this working using CI? Code examples and/or links are welcome. ...

Distributed db's or not?

INFORMIX-SQL 7.32 (SE) Linux Pawnshop App. I have some users who own several pawnshops within a 100-mile radius. Each pawnshop app runs with SE. The only functionality these owners need are: ability to remotely login to any store in order to view transactions, running totals and consolidate daily totals at end of business day. This can ...

How to get all rows that contain characters others than [a-zA-Z] in MySQL

I would like to ask if there is a possible way to select all rows from a table where the content of a column (varchar(255)) may contain characters others than standard english (a-zA-Z) or characters from different languages like Greek, French. For example if the table contains the following data: -- ID, Address -- | 1, "Test1" | | ...

Web text editor that reads MSFTEdit generated text

Anybody know of a Rtf text editor that will display "MSFTEdit" formated text in a browser. (microsoft Msftedit 5.41.15.1515) I have tried various editors but they all show the formating character strings. ...

how i can ignore the difference upper and lower case in search with mysql

how i can ignore the difference upper and lower case in search with mysql ...