Grey_Wolf Posted October 4, 2005 Report Share Posted October 4, 2005 kautkaads gljuks - netieku gudrs :( // Db jau piekonekteeta $query="DELETE FROM `tabula` WHEARE 0"; mysql_query($query); $gw_result_parbaude=false; // lai 100% buutu false $gw_result_parbaude=mysql_affected_rows(); echo '-'.$gw_result_parbaude.'- '; if ($gw_result_parbaude==true) { echo 'Ok'; } else { echo 'Nav Ok'; } atgriezj true :( bet peec idejas vajadzeetu false nu kaa minimums 0 pat vienkaarshi uzrakstot $gw_result_parbaude=mysql_affected_rows(); echo '-'.$gw_result_parbaude.'- '; rezultaats ir taads pats kas vareetu buut par lietu? P.S. sisteema - win, PHP4.3, SQL 4.1 ieprieksh nekas nno db netiek izvadiits.... un ir meginaats iebarot arii resurci Link to comment Share on other sites More sharing options...
bubu Posted October 4, 2005 Report Share Posted October 4, 2005 (edited) mysql_affected_rows() atgriež integeru nevis true/false. Kāds tolks ar true/false salīdzināt? Returns the number of affected rows on success, and -1 if the last query failed. Nu un ko echo mysql_affected_rows(); saka? Edit: es ceru, ka WHEARE ir pārrakstīšanās kļūda forumā. Tu taču saproti, ka tur jābūt WHERE, ja? Edit2: un KAD cilvēki IEMĀCĪSIES pārbaudīt mysql_query() fjas rezultātu un pielietot mysql_error() ? Edited October 4, 2005 by bubu Link to comment Share on other sites More sharing options...
Analgiins Posted October 4, 2005 Report Share Posted October 4, 2005 $query="DELETE FROM `tabula` WHEARE 0"; Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 4, 2005 Author Report Share Posted October 4, 2005 $query="DELETE FROM `tabula` WHEARE 0"; 23931[/snapback] WHERE - parakstiishanaas kljuuda forumaa taa arii nesapratu kas par gljuku :( parstarteeju sisteemu un viss aizgaaja... to bubu : paldies ka pieveersi uzmaniibu - tik tieshaam nav jegas saliidzinaat ar true/false :) jau kodaa izlaboju... (vaiiigs kautkaa biju palaidis garaam :( ) Link to comment Share on other sites More sharing options...
Recommended Posts