Hi Guido,
You need to add group by in your query get desire result
SELECT IFNULL(image,'no_image.jpg') as image,title, subtitle,
group_concat(concat(fname,' ',initial,' ',lname)) as author, pkisbn,
publisher FROM book INNER JOIN publisher on pkpublisher_id =
fkpublisher_id INNER JOIN module_bo
2011/05/19 12:43 +0200, Johan De Meersman
Uhh. I'm a bit fuzzy today, but I really don't see how a tab-separated dump
will help split off tables or databases :-)
To answer the original question, though; the technically accurate answer is
"yes, you can". It's made "easy" because mysqld
Hi Guido
I like your powerful query below, but it doesn't answer my question. I guess
some clarification is needed here.
OK, I have books in the database with more than one author. When I query for
the title of books and name of author, I get more rows for books that have more
than one author.
Hi Mimi,
I'm sorry, but my query doesn't work. In between I created 3 tables:
authors:
+---+--+--+-+-+
| Field | Type | Null | Key | Default | Extra
+---+--+--+-+-+
| a
- Original Message -
> From: "Dan Nelson"
>
> I doubt that mysql calls anything other than gethostbyname() or
> getaddrinfo(), so your behaviour is probably dependant on whatever OS
> you are running and how often its local resolver re-checks resolv.conf.
> Usually that's only once when a
Hi Mimi,
I'm not quite sure, if I did understand you right, but let's try the
following query:
select a.firstname, a.lastname, b.subject
from Author a, book_author ba, book b
where a.fkauthor_id IN
( select fkauthor_id, count(*) from book_author group by fkauthor_id having
count(*) > 1 )
and
might be my blog will help you :)
http://adminlinux.blogspot.com/2009/11/extract-single-dbtable-from-dump-file.html
have a good time..
On Thu, May 19, 2011 at 7:42 AM, Eric Bergen wrote:
> The mysql command line has the -o option to only execute queries for
> the default database. This can be
The mysql command line has the -o option to only execute queries for
the default database. This can be used to restore one database from a
dump file that contains many. For specific tables you can setup a
restore user that only has permissions on the tables you want to
restore then use the -f flag
In the last episode (May 19), Johan De Meersman said:
> I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the
> performance impact, that's not an issue.
>
> I just found out through failing logins that a server was still connecting
> to an old DNS server, and properly updated the r
Ok, say i have this table:
CREATE TABLE `User` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) DEFAULT NULL,
`email` VARCHAR(50) DEFAULT NULL,
`pass` VARCHAR(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MYISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
and i have
2011/05/18 22:22 +0100, Mimi Cafe
I am trying to retrieve record from 2 tables (book and author), but my
problem is how to retrieve all the names of authors where more than one
author wrote a book.
Here is what i have: it works OK, except that it returns more than one row
for books that
Johan De Meersman wrote:
- Original Message -
From: "Suresh Kuna"
Try to take a tab separated dump, so you can restore what ever you
want in terms of tables or databases.
Uhh. I'm a bit fuzzy today, but I really don't see how a tab-separated dump
will help split off tables o
- Original Message -
> From: "Claudio Nanni"
> Consider also the DNS TTL.
That should be irrelevant when changing DNS servers :-)
> If you flush hosts in MySQL it'll ask again the OS to resolve a name
> , but if that is still in the DNS cache it could return that 'old'
> value instead
- Original Message -
> From: "Suresh Kuna"
>
> Try to take a tab separated dump, so you can restore what ever you
> want in terms of tables or databases.
Uhh. I'm a bit fuzzy today, but I really don't see how a tab-separated dump
will help split off tables or databases :-)
To answer t
The tables have following structure. Both keys in table book_author are not
primary keys (should they?).
Author book_author book
publisher subject subject_book
== == ===
Johan,
Consider also the DNS TTL.
If you flush hosts in MySQL it'll ask again the OS to resolve a name , but
if that is still in the DNS cache it could return that 'old' value instead
of querying the newly updated NS.
I'm not sure thou, may be test by restarting the name server cache
deamon */et
Just encountered an interesting issue.
I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the
performance impact, that's not an issue.
I just found out through failing logins that a server was still connecting to
an old DNS server, and properly updated the resolv.conf. Commandl
Hint:
- group_concat
- group by
- having count(*)>1
Cheers
Claudio
2011/5/18 Mimi Cafe
> Hi
>
> I am trying to retrieve record from 2 tables (book and author), but my
> problem is how to retrieve all the names of authors where more than one
> author wrote a book.
>
> Here is what i
18 matches
Mail list logo