Possible to join in a count(*)

2004-04-22 Thread Victor Spång Arthursson
Hi! Using mysql version 4.0.x, and would like to know if it is possible to join in a count(*) from a related table which count the number of corresponding posts in this per post in the first table? A little like: table1: +-+--+ | id | name |

Re: Count all rows if limit by?

2004-03-22 Thread Victor Spång Arthursson
Thanks a lot, Jigal and Egor - just what i searched for! Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Count all rows if limit by?

2004-03-19 Thread Victor Spång Arthursson
Hi all! Is there a simple way to get the total number of rows a result _should_ have had if no where-clause where present? Without doing a second query? Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Query: count(distinct field1 max(fieldn)) where?

2004-03-18 Thread Victor Spång Arthursson
I need some help with a complex query of mine. The query in question looks like this: SELECT DISTINCT film_film.filmid, titel, pdf, termin, aar, film_serier.serieid, serienamn, screener, har_affisch, har_bilder, max( datum ) FROM ( ( ( `film_film` LEFT JOIN film_rel_regissoerer ON

group_concat() alternative for mysql 4.1?

2004-01-12 Thread Victor Spång Arthursson
Hi all! I'm wondering - are there any alternative to the function group_concat() for mysql servers prior to 4.1? The reason for asking is that I'm building a library database, where each book can have n numbers of authors, where n = 0. In listings I want to get all the authors of one book as

Re: alternate syntax for UNION?

2003-10-28 Thread Victor Spång Arthursson
2003-10-26 kl. 16.56 skrev Victor Spng Arthursson: Desperately need some way to get around the fact that UNION is not possible to use on mysql prior to version 4 Was just about to launch a site when it showed up that the hosting provider was running version 3. Help! Come on now - don't

alternate syntax for UNION?

2003-10-26 Thread Victor Spång Arthursson
Desperately need some way to get around the fact that UNION is not possible to use on mysql prior to version 4 Was just about to launch a site when it showed up that the hosting provider was running version 3. Help! Regards, Victor -- MySQL General Mailing List For list archives:

union the rows from select 1 not in select 2?

2003-10-15 Thread Victor Spång Arthursson
Need to find out which rows from select 1 are not present in select 2, but is it possible to make som kind of union that only returns the overlapping rows from the two selects? Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

get rows not present using join _AND_ where clause

2003-10-15 Thread Victor Spång Arthursson
I need to find out, using a join, which corresponding rows in a union that is missing. But it is among a certain subselect I want to do this, that is, among the rows where the column lang = 'uk' for example. The two tables looks like following: +---++---+ | id |

can't import sql using databasewhatever.sql

2003-10-13 Thread Victor Spång Arthursson
Hi! I'm having a strange problem - I can't read data using the mysql -u root -p databasepath/to/whatever.sql Not getting any error message, but some kind of introduction text flashes by reading: [powerbook:~] victor% /usr/local/mysql/bin/mysql -u root -p *** databas

How to specify --local-infile[=1]?

2003-10-01 Thread Victor Spång Arthursson
The manual tells that the option LOAD LOCAL INFIL can be specified at the command line client by setting the --local-infile[=1] -flag. How do I do that? Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

How to join from a union-result

2003-09-16 Thread Victor Spång Arthursson
Hi! I would like to perform a join on two tables, where one table is a UNION. This is because I have two different tables with products which looks the same and can be UNION:ed without problems So I'ld like to perform something like Select * from table left join [the union] on table.id =

Random result and split over several pages

2003-03-28 Thread Victor Spång Arthursson
Hi! I was wondering: is there any way to make mysql remember the last random or to return the limit in exactly the same order? I want to achieve a random on a result on which I use Limit in the sql. Greetings Victor -- I wish Bill Gates the best, I really do. I just think he and Microsoft

Is this possible? Group related results to one field

2003-03-06 Thread Victor Spång Arthursson
Hi! I'm having this main table with references to files in it: files +-+-+ | id | filename | +-+-+ |168 |v008-12.jpg| +-+-+ Then I have this table to relate one file to one or several categories: relatedtable +-++--+ |

related tables result collected in one field

2003-03-05 Thread Victor Spång Arthursson
Hi! I'm having this main table with references to files in it: kod: +-+-+ | id | filnamn | +-+-+ |168 |v008-12.jpg| +-+-+ Then I have this table to relate one file to one or several categories: +-++--+ |id | fromid

Select data that has no related categories...

2002-05-28 Thread Victor Spång Arthursson
Tells a great deal about how confused I am... I've a database with three tables, one with image data, one with categories and one table which helps me to have several categories per image... The following SQL gives me _all_ the images that has at least one category associated: SELECT

Implement a menu structure using an relative database

2002-01-02 Thread Victor Spång Arthursson
to solve it but... Sincerely Victor Spång Arthursson - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail

Easiest way to create a duplicate of a db?

2001-07-09 Thread Victor Spång Arthursson
For example if I want a copy of products named products1? Sincerely Victor query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To

Easiest way to create a duplicate of a db?

2001-07-09 Thread Victor Spång Arthursson
For example if I want a copy of products named products1? Sincerely Victor query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To

Re: Mac OS X Server 10.0.4 and startup

2001-07-05 Thread Victor Spång Arthursson
Hi! I build mine successfully using the instructions at http://www.devshed.com/Server_Side/Administration/BuildingOnOSX/. That one including the startup item wich is edscribed there... Sincerely, Victor -- database,sql,query,table

How do I restore a database backed up using mysqldump?

2001-07-02 Thread Victor Spång Arthursson
Hi! Mysqldump creates the files brand.txt brand.sql etc. How do i restore the database in a simple way..? I've looked in the manual but couldn't find out... Sincerely Victor - Before posting, please check:

HELP! Uninstall mySQL (Mac OS X (UNIX))

2001-05-30 Thread Victor Spång Arthursson
How do I do that? My installation of mySQL doesn't work, so I have to do it... Sincerely Victor Spång Arthursson [EMAIL PROTECTED] | V i c t o r | +45 35358799 / +46(0)733 204002 - Before posting, please check: http

My mySQL doesn't start...

2001-05-24 Thread Victor Spång Arthursson
: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [localhost:~] victor% Is it anyone who can tell me how to fix this..? Thankful for answers, Victor Spång Arthursson, sweden - Before posting