Hello, I am desperately trying to get the first two characters in
the second query and compare it to the first two characters in the
where clause.
basically, i need to get $lName,where the 1st two char in $lName are like the 1st 2 characters in $new_lname and $busPhone is equal to $new_busPhone.
While I am not getting any mysql errors, I am not getting any data either. Yes, I have at least one record that would match.
$sql_result = mysql_query("SELECT fname,lname,busPhone,uname
FROM signup WHERE id = $NewID ;");
while($rs = @ mysql_fetch_array($sql_result))
{
echo $new_fname = $rs["fname"]; echo " ";
echo $new_lname = $rs["lname"];
echo '<br>';
echo $new_uname = $rs["uname"];
echo '<br>';
echo $new_busPhone = $rs["busPhone"];
}
$sql_result2 = mysql_query("SELECT fName,lName,busPhone
FROM members WHERE '{lName}[/(.{2}]' LIKE '{$new_lname}[/(.{2}]' AND busPhone = '$new_busPhone' ;");
while($rs2 = @ mysql_fetch_array($sql_result2))
{
echo $new_fname2 = $rs["fName"];
echo $new_lname2 = $rs["lName"];
echo $new_uname2 = $rs2["uname"];
echo $new_busPhone2 = $rs["busPhone"];
please help...
thanks ~cherylw
}