Waspman
Posts: 948
|
| Posted: 09/21/2007, 9:46 AM |
|
anyone know why this doesn't work...
$to = CCDLookUp("Email", "users", "UserID =".$quotes->OwnerID->GetValue(),$DBconnection1);
also tried..
$to = CCDLookUp('Email', 'users', 'UserID ='.$quotes->OwnerID->GetValue(),$DBconnection1);
Ta.....Tony
_________________
http://www.waspmedia.co.uk |
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/22/2007, 3:12 AM |
|
Not enough info.
Syntax looks ok, both single (preferred) and duoble quoted.
Need surrounding code, like in which event?
Is connection name ok and globalled, same for $quotes.
Show us more.
Walter
echo 'value =' . $quotes->OwnerID->GetValue();
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Waspman
Posts: 948
|
| Posted: 09/22/2007, 3:42 AM |
|
Sorry W,
It is the email code created by CCS in the send email event:
global $quotes;
$OwnerID = $quotes->OwnerID->GetValue();
$to = CCDLookUp('Email', 'users', 'UserID ='.$quotes->OwnerID->GetValue(),DBconnection1);
$subject = "Quote submitted for job/project ".$Component->Title->GetText();
$message = "Submitted for your job/project ".$Component->Title->GetText();
$from = "email@address.com";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/html";
mail ($to, $subject, $message, $additional_headers);
Thanks again..
T
_________________
http://www.waspmedia.co.uk |
 |
 |
Waspman
Posts: 948
|
| Posted: 09/22/2007, 8:52 AM |
|
Sussed, it should have been...
$to= CCDLookUp('Email', 'users', 'UserID ='.$quotes->OwnerID->GetValue(), $Page->Connections["Connection1"]);
Getting there...
_________________
http://www.waspmedia.co.uk |
 |
 |
nhbw19t
Posts: 29
|
| Posted: 09/23/2007, 12:48 PM |
|
you need to put double quotes around your fields and tables. A DLookUp is a single select statement without the select, from, and where words.
In the Where clause you will need to include your single qoute around your text field or
use the ToSql method
$DBconn->ToSQL(var, ccsText); This will put in the single quotes for you.
_________________
J.D. Archer
GE Transportation |
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/24/2007, 4:05 AM |
|
Tony
Working now?
Check PM
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
|