2108 solutions found
Page 29 of 106votes
I would like to know how can I output a number with 2 decimal places, without rounding the original number. For example: 2229,999 -> 2229,99 I a...
votes
I am storing the last login time in MySQL in, `datetime`-type filed. When users logs in, I want to get the difference between the last login time and the curren...
votes
I often see people are using Delimiters. I tried myself to find out what are delimiters and what is their purpose. After 20 minutes of googling, I was not able...
votes
I've been struggling with this for some time. I've installed Rails 3, gem, mysql on my Snow Leopard machine. All was going well until I created my fi...
votes
I was wondering if there is a way to do this purely in sql: q1 = SELECT campaign_id, from_number, received_msg, date_received FROM `received_t...
votes
Here is what I want to do: current table: +----+-------------+ | id | data | +----+-------------+ | 1 | max...
votes
The 'id' field of my table auto increases when I insert a row. I want to insert a row and then get that ID. I would do it just as I said it, but is t...
votes
I have numbers saved as `VARCHAR` to a MySQL database. I can not make them `INT` due to some other depending circumstances. It is taking them as character n...
votes
The [MySQL documentation][1] says that it should be `\'`. However, both SciTE and MySQL shows that `''` works. I saw that and it works. What shou...
votes
I have a query where I am using `GROUP_CONCAT` and a custom separator as my results may contain commas: '----' This all works well, however it is sti...
votes
I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints...
votes
After noticing an application tended to discard random emails due to incorrect string value errors, I went though and switched many text columns to use the `utf...
votes
I have a database called `nitm`. I haven't created any tables there. But I have a SQL file which contains all the necessary data for the database. The file...
votes
Can I run a select statement and get the row number if the items are sorted? I have a table like this: mysql> describe orders; +-------------+...
votes
I'm working on code written by a previous developer and in a query it says, WHERE p.name <=> NULL What does `<=>` mean in this query?...
votes
In short: Is there any way to sort the values in a GROUP_CONCAT statement? Query: GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " &...
votes
I wanted to run a simple query to throw up all the rows of `Table1` where a principal column value is not present in a column in another table (`Table2`). I...
votes
I just ran a simple MySQL CREATE TABLE statement that produced the line >"Query OK, 0 rows affected, 1 warning (0.07 sec)." It didn't a...
votes
How to restore one of my MySQL databases from `.myd`, `.myi`, `.frm` files?
votes
I created user `user@'%'` with `password 'password`. But I can not connect with: mysql_connect('localhost:3306', 'user', '...