Från professionella översättare, företag, webbsidor och fritt tillgängliga översättningsdatabaser.
ansi sql query mode
ansi sql 查詢模式
Senast uppdaterad: 2006-09-06
Användningsfrekvens: 1
Kvalitet:
you also have to fetch all result rows from an unbuffered sql query, before you can send a new sql query to mysql.
蛁: the benefits of mysql_unbuffered_query() come at a cost: you cannot use mysql_num_rows() on a result set returned from mysql_unbuffered_query(). you also have to fetch all result rows from an unbuffered sql query, before you can send a new sql query to mysql.
it means that sql queries are able to circumvent access controls, thereby bypassing standard authentication and authorization checks, and sometimes sql queries even may allow access to host operating system level commands.
many web developers are unaware of how sql queries can be tampered with, and assume that an sql query is a trusted command. it means that sql queries are able to circumvent access controls, thereby bypassing standard authentication and authorization checks, and sometimes sql queries even may allow access to host operating system level commands.
?php / * connecting, selecting database * / $link = mysql_connect( "mysql_host", "mysql_user", "mysql_password") or die("could not connect"); print "connected successfully"; mysql_select_db("my_database") or die("could not select database"); / * performing sql query * / $query = "select * from my_table"; $result = mysql_query($query) or die("query failed"); / * printing results in html * / print "table \n"; while ($line = mysql_fetch_array($result, mysql_assoc)) {print "\t tr \n"; foreach ($line as $col_value) {print "\t\t td $col_value / td \n";} print "\t / tr \n";} print" / table \n"; / * free resultset * / mysql_free_result($result); / * closing connection * / mysql_close($link);?
?php /* l½ӑ¡Աʽ¾ݿ⠪/ $link = mysql_connect("mysql_host", "mysql_user", "mysql_password") or die("could not connect"); print "connected successfully"; mysql_select_db("my_database") or die("could not select database"); /* ִА sql ²鑯 */ $query = "select * from my_table"; $result = mysql_query($query) or die("query failed"); /* Ԛ html ´ṻ */ print "table \n"; while ($line = mysql_fetch_array($result, mysql_assoc)) {print "\t tr \n"; foreach ($line as $col_value) {print "\t\t td $col_value /td \n";} print "\t /tr \n";} print" /table \n"; /* ʍ·ŗʔ´ */ mysql_free_result($result); /* ¶Ͽªl½Ӡ*/ mysql_close($link);?