最新回答 / 慕粉2058116677
如果你的項目對數據庫類型沒太大的要求,只用mysql的話,之前你又數據mysql的寫法,可以使用mysqli擴展,面向對象和面向過程兩種寫法都可以。如果你的項目要兼容多個不同類型的數據庫的話,建議使用pdo,擴展性好,兩者的性能都差不多。主要看你的用途
2017-04-08
最新回答 / Soulans
完整的看就不一樣了。當鍵入為【liu】時:select * from user where uername = 'liu' and password ='liu123';當鍵入為【' or 1=1 #】時:select * from user where username = '' or 1=1 # and password = ; 這時,or 1=1 使得查詢成立。當quote后【\' or 1=1 #\'】:select * from user where username = '\' or 1=1 ...
2017-04-08
最新回答 / 我是新手_請多指教
我才剛學不久,我想應該是前面dbname=article庫沒選錯的話,那么SELECT * from article中article不能寫數據庫,應該改為article庫下的某張數據表
2017-03-27
最新回答 / 妄想翻身的咸魚
因為在下面new PDO的時候第四個參數,如果你new的時候傳了前面三個,不傳第四個,那就不存在這個變量,就會報錯,所以這樣寫的作用就是你不傳第四個參數的時候就把它設為空,這個變量就存在了就不會報錯了
2017-02-21
最新回答 / 杰or毅
mysql:host:localhost;dbname=books','root'host后 : 改 =?mysql:host=localhost;dbname=books','root'
2017-02-08