プロの翻訳者、企業、ウェブページから自由に利用できる翻訳レポジトリまで。
ansi sql query mode
ansi sql 查詢模式
最終更新: 2006-09-06
使用頻度: 1
品質:
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);?