I don't think you can reference the aliased column timea in the select
clause, I know sql server won't let you do it..try and
(labor_qty*parts_time+parts_setup)labor_time
-Original Message-
From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk]
Sent: Tuesday, November 12, 2002 10:16
Have you ran it by hand in MySQL from the command prompt with some test
data and gotten an error?
Adam
On Tue, 12 Nov 2002, Steve Dodkins wrote:
if i have a statement
$result = mysql_query(SELECT
Top man!!
Many thanks
Steve
-Original Message-
From: [EMAIL PROTECTED] [mailto:epeloke;echoman.com]
Sent: 12 November 2002 16:02
To: Php-Db (E-mail)
Subject: RE: [PHP-DB] sql select
I don't think you can reference the aliased column timea in the select
clause, I know sql server won't
On Sat, Mar 24, 2001 at 08:55:13PM -, Grant wrote:
Is there any way of using a string in an SQL query instead of using the
table name. Something along the lines of
$result=mysql_query("SELECT * FROM $tablename",$db);
this doesnt work it come up with a parse error
Your problem is
Grant,
$link_id = mysql_connect($host, $usr, $pass) or die (mysql_error());
mysql_select_db($database, $link_id);
$sql="select fields from $table where criteria = $value";
$result = mysql_query($sql, $link_id) or die ("no results"); //return result
set to php
you still need to do something
In article 99jh2n$gr1$[EMAIL PROTECTED],
[EMAIL PROTECTED] ("Grant") wrote:
Is there any way of using a string in an SQL query instead of using the
table name. Something along the lines of
$result=mysql_query("SELECT * FROM $tablename",$db);
this doesnt work it come up with a parse
I want to find out which memberIDs have BOTH choice 2 AND choice 3.
-- SELECT memberID from table where choice=2 AND choice = 3
That won't work (0 results, of course, because no row has two choices,
they're mutually exclusive)
Exactly, keep several rows for choices,
have two tables
Addressed to: "JJeffman" [EMAIL PROTECTED]
"PHPDB" [EMAIL PROTECTED]
"bill" [EMAIL PROTECTED]
** Reply to note from "JJeffman" [EMAIL PROTECTED] Sat, 17 Feb 2001 13:11:20
-0300
Try this way :
"select t1.memberID,t1.choice,t2.memberID, t2.choice from table as t1,