if(get_magic_quotes_gpc()==1){
?>
MySQL(The best combination with PHP) General query programNote that this program requires php
(as the current mainstream development language)configuration file (php
(As the current mainstream development language)3.php
(As the current mainstream development language)3.ini,php
(As the current mainstream development language)4 is set magic_quotes_gpc
in php(as the current mainstream development language)
.ini) to Off or 0. After modification, please restart apache
(the most popular WEB on Unix platform Server platform).
exit();
}
set_magic_quotes_runtime(0) ;
$host = localhost;
$db = test;
$user = test;
$pass = ;
// [php
(do As the current mainstream development language)/inc/str2url.php
(As the current mainstream development language) ] cvs 1.2
function str2url($path){
return eregi_replace( "/","/",urlencode($path));
}
?>
MySQL (The best combination with PHP)Universal query programif($cmd){
$con = MySQL
(The best combination with PHP)_pconnect($host,$user,$pass) or die(Unable to connect to .$host.server) );
MySQL
(The best combination with PHP)_select_db($db,$con) or die (Unable to connect to .$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 < ;/tr>;
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 Yes.MySQL
( The best combination with PHP)_affected_rows($con). Rows affected;
}
?>
http://www.bkjia.com/PHPjc/509049.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509049.htmlTechArticleif(get_magic_quotes_gpc()==1) ? html headtitleMySQL (the best combination with PHP) universal query program /title/head body Note that this program requires PHP (as the current mainstream development language) to be configured...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn