Search This Blog

Tuesday, July 26, 2011

Why doesn't this join logic works?

Hello;


I using the following sql to get information from two tables –through join;


/




/ this join works in sql, but can
$res = "select ad.firstname, ad.lastname, ad.address, ad.city, ad.state, ad.zipcode, ad.dhtmlgoodies_category, ad.dhtmlgoodies_subcategory, ad.caryear, ad.customerid, ad.servicedesc, aj.email, aj.areacode, aj.phoneprefix, ad.clientID,
aj.phonesufix, aj.cellareacode, aj.cellprefix, aj.cellsufix, aj.commentonclient from additional_cars as ad, ajax_client as aj where ad.clientID='$clientId' group by ad.clientID";




it works fine when tested in phpmyadmin, but fail we incorporated with the following which passes the value to another form using “formObj”. here is the entire code:





function toSafeString($string) {
$string = str_replace('
', "n", $string);
$string = preg_replace('/[rn]/s', 'n', $string);
$string = str_replace(array('','
'),"n",$string);
return $string;
}

if(isset($_GET['getClientId'])){
$clientId = preg_replace("/[

No comments:

Post a Comment