[snip] I have the SQL statement which store in $str variable as shown below : How to get the '%WS-X5225R%' from $str variable ? $str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, "; "tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,"; "tbl_chassis.city,tbl_chassis.building, "tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis .chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_fiel d_2,tbl_chassis.chasis_user_field_3" "from tbl_chassis tbl_chassis,tbl_card tbl_card " "WHERE tbl_chassis.serial_no = tbl_card.serial_no AND tbl_card.card_model LIKE'%WS-X5225R%'"; [/snip] What do you mean " get the '%WS-X5225R%' from $str variable" ? Do you want to be able to change that value? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php