Puika1 Posted March 31, 2010 Report Share Posted March 31, 2010 (edited) Tātad,man ir sekojoša problēma,es iegāju www.manalapa.lv/forum/admin/ -MANAGEMENT-Custom Profile Fields un izveidoju jaunu lauku skyp niks kad ievietoju savu profile fiels,viņš saglabāja datubāzē šādi un izveidotais scripts izskatās šādi <? $result = mysql_query("SELECT * FROM ibf_pfields_content id='$id'"); while($r = mysql_fetch_array($result)) { echo "skyp "; echo $r['field_1']; echo "<br />"; } ?> field_1 -ir datubāzes tabula,kur ir saglabājies skyp niks,bet sekojoša scripta problēma ir uzmetot šādu kļūdu a un 7 rinda ir šī while($r = mysql_fetch_array($result)) Kas varētu būt par problēmu,un kā to izlabot? Edited March 31, 2010 by Puika1 Quote Link to comment Share on other sites More sharing options...
2easy Posted March 31, 2010 Report Share Posted March 31, 2010 (edited) WHERE kā arī īpaši priekš tevis kādu laiku atpakaļ palūdzu nopinot šo topiku http://php.lv/f/topic/15467-warning-mysql-result-supplied-argument-is-not-a-valid-mysql-result-resource/ Edited March 31, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
Puika1 Posted March 31, 2010 Author Report Share Posted March 31, 2010 (edited) ieliku šādi,bet nestrādā where($r = mysql_fetch_array($result)) { Kļūda Parse error: syntax error, unexpected '{' in /home/radio/public_html/profils/4.php on line 7 ieliku,lai rāda kļūdas paziņojumu You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '='1'' at line 1 Edited March 31, 2010 by Puika1 Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 31, 2010 Report Share Posted March 31, 2010 Ar WHERE bija nevis jāaizvieto PHP skripta kontroles vārds while, bet gan tas jāieliek SELECT vaicājumā, jo nav ielikts. "SELECT * FROM ibf_pfields_content WHERE id='$id'" Quote Link to comment Share on other sites More sharing options...
2easy Posted March 31, 2010 Report Share Posted March 31, 2010 (edited) aha, un tagad padomā, kāpēc es uzrakstīju WHERE edit: Aleksejs visu pateica priekšā. tb tev vairs pašam nav jādomā... :D:D:D bet izskatās, ka tu to jau tāpat nedari :P Edited March 31, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
Puika1 Posted March 31, 2010 Author Report Share Posted March 31, 2010 (edited) Unknown column 'id' in 'where clause' paldies,ir džeki,pats atklāju viss tagad kārtībā :) Edited March 31, 2010 by Puika1 Quote Link to comment Share on other sites More sharing options...
2easy Posted March 31, 2010 Report Share Posted March 31, 2010 member_id 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.