On Nov 13, 4:56 pm, [EMAIL PROTECTED] (Deviloper) wrote:
> I have a SQL-Statement with a Regular Expression and I want to use a scalar
> in that expression: (Looking for something like "$tool =~ m/\Q$x\E/" )
>
> #Find tools with xx in the name:
> $dbh->prepare ("SELECT name FROM toolbox WHERE
I have a SQL-Statement with a Regular Expression and I want to use a scalar in
that expression: (Looking for something like "$tool =~ m/\Q$x\E/" )
#Find tools with xx in the name:
$dbh->prepare ("SELECT name FROM toolbox WHERE name REGEX '$x'");
#or
$dbh->prepare ("SELECT name FROM toolbox
This question should go to:
http://lists.mysql.com/list.php?list=mysql#b
You can try this in MySQL:
SELECT company, date, SUM(sales) AS `totalsales`, SUM(cost) AS
`totalcost`
FROM tablename
GROUP BY company, date
ORDER BY company, date
On Wednesday, Jul 9, 2003, at 13:59 US/Eastern, Paul Kraus
Paul Kraus wrote:
> This probably is not the place for this post. But it is in a perl
> application so I thought I would check with you guys first.
>
> I have to query a mysql database (using DBI)
>
> It has records like this
>
> Date|company|sales|cost
>
> Each date has two records on for each
This probably is not the place for this post. But it is in a perl
application so I thought I would check with you guys first.
I have to query a mysql database (using DBI)
It has records like this
Date|company|sales|cost
Each date has two records on for each of the two companies we deal