K2Master Posted December 31, 2010 Report Share Posted December 31, 2010 (edited) Tātad problēma sekojoša. Mainīgajiem piešķirtas vērtības $grandi_ = mssql_query("Select gr_count from Character where name='. $char_set .'"); $grandis = mssql_fetch_row($grandi_); $grandi = $grandis + 1; $gr_str1 = 1000; $GR_DS[0] = $gr_str1 * $grandi; $gr_agi1 = 1000; $GR_DS[1] = $gr_agi1 * $grandi; $gr_vit1 = 1000; $GR_DS[2] = $gr_vit1 * $grandi; $gr_ene1 = 1000; $GR_DS[3] = $gr_ene1 * $grandi; $gr_com1 = 1000; $GR_DS[4] = $gr_com1 * $grandi; Bet kods man lasa pozīciju tabula. Bet man vajag lai attiecīgās šūnas satura skaitlis būtu $grandis . Nocīnijies esmu jau visu dienu. Bet rezultāts 0 :( Varbū kāds var palīdzēt. Paldies jau iepriekš. Edited December 31, 2010 by K2Master Quote Link to comment Share on other sites More sharing options...
marcis Posted December 31, 2010 Report Share Posted December 31, 2010 Pirmkārt, $grandis = mssql_result($grandi_, 0, 'gr_count'); otrkārt nesapratu nesapratu par kādām šūnām tu tur runā :) Quote Link to comment Share on other sites More sharing options...
K2Master Posted December 31, 2010 Author Report Share Posted December 31, 2010 Tajā tevis iedotajā rindiņā šāds error. Warning: mssql_result() [function.mssql-result]: Bad row offset (0) Itkā strādā ar šādu risinājumu, tikai nezinu cik droši tādu koda mučkuli taisīt un cik daudz tur lieks tajā visā ko var izravēt ārā. $gr_str1 = 1000; $gr_agi1 = 1000; $gr_vit1 = 1000; $gr_ene1 = 1000; $gr_com1 = 1000; $mmm = "Select Name,Class,cLevel,Reset,AccountID,gr_count from Character where Name='". $char_set ."' order by gr_count desc, reset desc, clevel desc"; $grands = @mssql_query($mmm); $grandis = mssql_fetch_row($grands); $grandi = $grandis[5] + 1; $GR_DS[0] = $gr_str1 * $grandi; $GR_DS[1] = $gr_agi1 * $grandi; $GR_DS[2] = $gr_vit1 * $grandi; $GR_DS[3] = $gr_ene1 * $grandi; $GR_DS[4] = $gr_com1 * $grandi; Quote Link to comment Share on other sites More sharing options...
daGrevis Posted December 31, 2010 Report Share Posted December 31, 2010 (edited) Kas par murgu? Saproti, ja Tu saglabā mainīgajā datus pa tiešo no datubāzes, ar viņiem nevar rīkoties. Vajag darīt šādi... $data = mysql_result( mysql_query( $sql ), 0 ); ...vai fn mysql_fetch_row(). Vai arī Tev ir MS SQL? Es eju svinēt. Edited December 31, 2010 by daGrevis Quote Link to comment Share on other sites More sharing options...
K2Master Posted December 31, 2010 Author Report Share Posted December 31, 2010 mssql Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.