Hi,
I have a table with this structure:
CREATE TABLE dats (
id INT UNSIGNED NOT NULL,
id_ref INT UNSIGNED NOT NULL,
start DATE NOT NULL,
endDATE NOT NULL
)
Now I am trying to create a query that will give me all intervals for which
the table does not con
> It's really not all that different that source code. For each
> application I build, I tend to put the source code in our CVS
> repository long with the $foo.sql file(s) to reconstruct the tables.
> Just as there's nothing preventing me from deploying a new release of
> an application before ch
Hi,
is there any way to have MySQL automatically keep track of any changes
I do with ALTER TABLE and later spit out the changes again?
I use one database (well, actually several, but that's not important
here) for development and one database for the production system. Now,
whenever I change t
> I have a MySQL database containing records from several years. I want to
> calculate counts of records for each year and separate values for a couple
> of other fields. Each record contains a date-field, date. I tried putting
> the function YEAR(date) into a GROUP BY section, but this didnot wor
Hi Dean,
> I have a table with a char(2) and when I send it '02' I want it to stay
> 02,
> but instead it stores 2
>
> How do I make this store as '02'?
Works for me:
mysql> create table t ( a char(2) );
Query OK, 0 rows affected (0.08 sec)
mysql> insert into t values ('02');
Query OK, 1 row
to MySQL but e.g. directly to the
filesystem.
Any thoughts on this?
Jens Vonderheide
REDLINK Mediendienste GmbH
http://www.redlink.de/
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
Hi Travis,
> I have the database files, now how do I put them back into mysql?
mysqlhotcopy simply copies the data files to another directory. To restore
them, terminate the mysql server and then copy the files back to the mysql
data directory (e.g. /var/lib/mysql/).
Note that mysqlhotcopy fails
Hi,
how can I check how much of the InnoDB data files are already taken?
Jens
(MySQL...)
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
> Message From To
>
> Exampel 1 2
>
> UserID UserName
>1 Me
>2 You
>
> Message From To
> ExampelMe You
SELECT
u.Message, u1.UserName AS From, u2.UserName AS To
FROM
Messages AS m,
UsersAS u1,
UsersAS u2
WHERE
m.From = u
Hi Erik,
> In the "files" table, each row corresponds to a separate file. There's
> all sorts of additional criteria, but the only one that matters to my
> question is the column called "div_id". That's right, the number in
That's exactly what I would recommend you to do. As you wrote, you can
Hi,
I am planning an authentication system that is structured much like the
system Windows uses:
I have "users" and "groups". Groups can either contain users directly or can
contain other groups (which can again contain groups etc).
Now I am thinking on how to store and efficiently read those de
> If you wouldn't mind, though I think the folks at MySQL.Com
> should consider
> throwing a copy back up. Maybe I'm just a nervous nelly, but I won't be
I agree with that. It wasn't really a problem using a manual for a
subrevision higher than the version I used, but to V4, some things changed,
> > is it possible to update fields of a table with values taken
> from another
> > table? Like this (illegal) command would do:
> > UPDATE b SET b.v = a.v WHERE b.id = a.id;
>
> Not yet.
>
> Multi-table deletes/updates are planned for MySQL 4.0, AFAIK.
Then I have to stick to the method I am cur
Hi,
is it possible to update fields of a table with values taken from another
table? Like this (illegal) command would do:
UPDATE b SET b.v = a.v WHERE b.id = a.id;
Jens
-
Before posting, please check:
http://www.mysql.com/
Hi,
if I use a query like
SELECT id FROM table WHERE id IN (7,2,100,65)
is it possible to get the results ordered in exactly the same way as the IN
list (7,2,100,65)?
Mit freundlichen Grüßen,
REDLINK Mediendienste
Jens Vonderheide, Dipl.-Inform.
Telefon: (0171) 8395997
> How would you actually overcome that? Wouldn't it be good if
> MySQL would be adapted to actually do this for you?
I think that not reusing deleted numbers is easier (i.e. more efficient).
IIRC, earlier versions of MySQL in fact reused the numbers.
There are 2 ways to overcome this:
1) Check
> When I first added about 10 records and then deleted a few records and
> then added more records it didn't replace the missing records.
That's MySQL's usual behaviour. auto_increment only garantees to create
unique keys. "Holes" left by deleting data are not filled.
Jens
> I have not been able to figure this out, yet. I found the file
> /usr/share/mysql/make_binary_distribution and tried a make on it; no
> luck. I scoured the documentation on the web and in my own distribution
> and have not been able to find out what to do next. See Below. I would
> appreciat
> Why does it give the old version number ? Have I done something wrong
> ? Should I put --with-mysql=/path/to/mysql ?
Yes, you should. If you leave out the path, PHP uses a MySQL library shipped
with the PHP source code. You should have gotten a warning after the
./configure for PHP, explaining
> err mex:
> "configure: error: installation or configuration problem: C
> compiler cannot create executables"
Take a look at config.log, you will usually find the real cause for the
error in there.
Jens
-
Before posting, plea
> So, when I am calling info from this database, I get doubles of
> each result. How can I delete just one of each entry, so I am
> left with just:
Use:
DELETE FROM WHERE LIMIT 1
Jens
-
Before posting, please check:
htt
> I basically have a situation where 300,000+ rows are being inserted into a
> log table daily, and also needing to be cleared out based on a
> tstamp. What
> I've found is that the inserts work fantastic, but when I got to do the
> delete, even if it doesn't do anything, it sits there and blocks
> I tried to query below,
> "select src_ip, byte, packet from table group by src_ip order by
> bytes desc limit 10"
>
> Then DB said, "ERROR 1114: The table 'SQL2997368_0' is full."
MySQL tries to create a temporary table to handle your "order by" command.
These tables are usually created in /tmp
Hi Bogomolnyi,
I am really interested in your scripts. I don't have a use for them at this
time, but I am planning to use a fallback system myself in the next few
month.
> 5 pc , and I use it for a web cluster (10 pc) so I use 1 slave
> for 2 httpds
Do you have a similar scheme for the web serv
24 matches
Mail list logo