PHP + MySQL, how to get total rows matched when using LIMIT 0, 10?

2002-11-05 Thread SED
I'm trying to get the total matched rows when I'm using "LIMIT 0, 10", but I only get the number 10, when the total should be around 100. So, can I get total matched rows without doing a separate query using count()? Here is an example of my current query: $result = mysql_query("SELECT * FROM pro

RE: Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread SED
sult (date, name, impoartance): 20020102, John, 3; 20020101, Smith, 5; 20010101, Sigmund, 1; 2101, Sigmund, 8; now I want to sort the result by importance (desc) so the final will be: 2101, Sigmund, 8; 20020101, Smith, 5; 20020102, John, 3; 20010101, Sigmund, 1; Do you have any way of doin

Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread SED
he result by the 'importance', can I do that via MySQL and if so, how? Thanks, SED - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

How do I select something distinct ordered by most frequent? (e.g. top 10)

2002-02-01 Thread SED
Hi, I'm trying to make a query where I select something distinct ordered by most frequent? I found below example from the manual but I can not figure out how I should order them by most frequent - do you know how? SELECT DISTINCT owner FROM pet Regards

[OT] Javascript Manual

2001-06-07 Thread SED
Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is

RE: is PHP list dead?

2001-05-30 Thread SED
If you check out the www.php.net you will find out it temporally out of order. I sure hope it will be up soon :) Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503

Is any limit on how many tables one database can have?

2001-04-20 Thread SED
s any limit on how many tables one database can have? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is &

Can I have two (or more) different SQL-databases on the same server?

2001-01-31 Thread SED
Hi, Can I have two (or more) different SQL-databases running at the same time on the same server (or same computer)? Does it varies between the systems? And if I can, are they all available to PHP at the same time? Regards, Sumarlidi Einar Dadason SED - Graphic Design

Are all SQL-databases based on the same query-language?

2001-01-31 Thread SED
Hi, I have only used MySQL. Today I read that all SQL use the same query-language, so if you program something, e.g. in PHP, you can also use is with other SQL-databases, with perhaps minor adjustments for the database-connections. Is this true? Regards, Sumarlidi Einar Dadason SED - Graphic

RE: The function of auto_increment and Premier Key? - Thanks!

2001-01-19 Thread SED
Thanks you for your good explain of this all - now I have a good idea of how it works. Ps. I meant that I'm familiar to simple databases like MS Access etc. but not of course MySQL witch I think is great! :) Sumarlidi -Original Message- From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED

The function of auto_increment and Premier Key?

2001-01-19 Thread SED
used for and how does it work? Do I need it if I have a row ID like mentioned above? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROT

What type of a Column for "True" or "False"?

2001-01-16 Thread SED
Hi, I'm new to MySQL and I want to create a column which only needs to include "True" or "False" statement, but I'm not sure what type of a column I should use. Can you give me a hint? I have read the manual but it was not enough to convince me. Regards, Sumarlid

Sub-Query in Windows 2000 -> Problem solved!

2001-01-15 Thread SED
WHERE price=(SELECT MAX(price) FROM shop) In MySQL (which does not yet have sub-selects), just do it in two steps: Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 46

Sub-Query in Windows 2000

2001-01-15 Thread SED
n your SQL syntax near 'SELECT MAX(price) FROM shop)' at line 3 Does anyone know why? Does Windows2000 not support Sub-Query? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fa