|
Posted by weetat on 03/12/07 07:41
Hi all ,
I have code below :
When the $title is 'AIM's' , echo $title in php is ok , however when
insert or update the data ,
it show this : AIMA’s .
Anyone have any ideas why when insert 'AIM's' to MYSQL database ,it
display AIMA’s.
Thanks
if(!$num_rows){
$db_string = $DB->compile_db_insert_string( array(
'page_id'
=> $page_id,
'title' =>$title,
'sub_page'
=> $sub_page,
'file_name' => $file_name,
) );
$db_query = "INSERT INTO tbl_title (" .$db_string['FIELD_NAMES'].
") VALUES (". $db_string['FIELD_VALUES'] .")";
$DB->query( $db_query );
}else{
// edit
$db_string = $DB->compile_db_update_string( array(
'title' => $title,
'sub_page'
=> $sub_page,
) );
$db_query = "UPDATE tbl_title set " .$db_string. " WHERE file_name
= '". $file_name ."'";
$DB->query( $db_query );
}
Navigation:
[Reply to this message]
|