Re: [Fwd: Re: MUTIPLY function?]

2004-12-22 Thread Alex croes
[EMAIL PROTECTED] wrote: Michael Stassen wrote: EXP(SUM(LOG(COALESCE(*the field you want to multiply*,1))) which works because LOG(xy) = LOG(x) + LOG(y), and EXP(LOG(x)) = x. Hence, sum of the logs = log of the product, so exp of the sum of the logs = exp of the log of the product = the produc

[Fwd: Re: MUTIPLY function?]

2004-12-21 Thread Alex croes
Michael Stassen wrote: No, but Harold Fuchs gave the following solution to Shawn Green in an earlier thread on this topic . EXP(SUM(LOG(COALESCE(*the field you want to multiply*,1))) which works because LOG(xy) = LOG(x) + LOG(y), and EXP(LOG(x)) = x. Hence,

MUTIPLY function?

2004-12-07 Thread Alex croes
Is there in the MySQL query language a function just like the SUM() but instead of adding multiplying? AC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

[sql]There was to be a simpeler way

2004-12-06 Thread Alex croes
I'm currently using the following query: SELECT SUM(IF(`01`=1, 1,0)) AS 01A, SUM(IF(`01`=2, 2, 0)) AS 01B..., SUM(IF(`55`=1, 1,0)) AS 55A, SUM(IF(`55`=2, 1,0)) AS 55B FROM tableA INNER JOIN tableB ON tableA_ID = tableB_ID INNER JOIN tableCON tableB_aID = tableC_aID INNER JOIN tableD ON tableD_I

Query question

2004-04-21 Thread Alex croes
I'm trying to select specified data from a field in a table. The field from which the data has to come contains the following: 'something;else;anything;everything;name;my' (and so on), it's a long text. I need in the case just 'my' from the field, thus between the ';'. This time there are only

Re: PHP and using mysql_last_id()

2004-03-16 Thread Alex croes
sgannon60 wrote: Hi can anyone tell me how to use php's mysql_last_id() or MySQL's INSERT_LAST_ID I personnaly think mysql_last_id will never work..., but try mysql_insert_id() This will generate the ID of the PREVIOUS insert query. So it has to be mysql_insert_id()+1 Alex -- MySQL Genera

MySQL viewer

2004-02-03 Thread Alex croes
I'm currently using MyCC as a tool to "view" and maintain a MySQL-database of mine. I find it quit a good tool, but which tool are you guys using. I have heard about MySQLfront and Navicat. Are this also good tools to maintain the database. What are the pro's and the con's of this viewers? Alex

Database design, which is better

2004-01-26 Thread Alex croes
I have an question about the design of a database. What is the best way to design tables. Is it better to create many small tables, or create fewer big tables. Which of those two options will get the best performance? TIA, Alex Croes -- MySQL General Mailing List For list archives: http

Re: MySQL Query

2004-01-16 Thread Alex croes
toni baker wrote: How can change the syntax of the query below to a "LIKE" criteria query? SELECT ORGANIZATION_ID, ORGANIZATION_NAME, MATCH (ORGANIZATION_NAME) AGAINST ("houston") AS score FROM ORGANIZATION WHERE MATCH (ORGANIZATION_NAME) AGAINST ("houston") ORDER BY score DESC, ORGANIZATION

Re: Issues using Week() or Weekofyear() functions with php

2004-01-16 Thread Alex croes
Ben Whitesell wrote: I'm trying to use the week() or weekofyear() functions in a php script. Here's a clipping of the code: $sql = "SELECT WEEK('2004/06/01')"; echo $sql; //used for checking purposes $week = mysql_query($sql, $link);//where $link is in an inc file