If (get_magic_quotes_gpc () 1) &# 123; & nbsp ;? & Gt; & lt; html & gt; & lt; head & gt; & lt; title & gt; MySQL (the best combination with PHP) universal query Program & lt; /title & gt; & lt;/head & gt; & lt; body & gt; note that if (get_magic_quotes_gpc () = 1 ){
?>
MySQL (best combination with PHP) universal query program
Note that the configuration file php (as the mainstream development language) (php (as the mainstream development language) 3 is php (as the mainstream development language) 3.ini, php (as the mainstream development language) 4 is php (as the mainstream development language ). magic_quotes_gpc in ini)
Set it to Off or 0. after modification, restart apache (the most popular WEB server platform on Unix ).
Exit ();
}
Set_magic_quotes_runtime (0 );
$ Host = localhost;
$ Db = test;
$ User = test;
$ Pass =;
// [Php (as the mainstream development language)/inc/str2url. php (as the mainstream development language)] cvs 1.2
Function str2url ($ path ){
Return eregi_replace ("/", "/", urlencode ($ path ));
}
?>
MySQL (best combination with PHP) universal query program
If ($ cmd ){
$ Con = MySQL (the best combination with PHP) _ pconnect ($ host, $ user, $ pass) or die (unable to connect to. $ host. server );
MySQL (best combination with PHP) _ select_db ($ db, $ con) or die (unable to connect. $ db. database );
$ Rst = MySQL (the best combination with PHP) _ query ($ SQL, $ con) or die ($ SQL. error );
If ($ cmd = query ){
$ Num_fields = MySQL (the best combination with PHP) _ num_fields ($ rst );
Echo;
Echo
;Echo
. $ SQL.;
Echo
;For ($ I = 0; $ I <$ num_fields; $ I ++) echo
| . MySQL (the best combination with PHP) _ field_name ($ rst, $ I ). | ;Echo
;While ($ row = MySQL (the best combination with PHP) _ fetch_row ($ rst )){Echo
;For ($ I = 0; $ I <$ num_fields; $ I ++) echo
| . $ Row [$ I]. | ;Echo
;}Echo
;
MySQL (the best combination with PHP) _ free_result ($ rst );
}
Else echo has. MySQL (the best combination with PHP) _ affected_rows ($ con). The row is affected;
}
?>