FeNzIee Posted October 8, 2011 Report Share Posted October 8, 2011 Es īpaši neko nesaprotu tajos kodos tāpēc uzrakstīju šeit. Lūdzu palīdziet, esiet tik mīļi. Rekur ir problēma! Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\******\******\vuser.php on line 18 KODS : http://paste.php.lv/18569d2f6809d00d29068a117b581e08?lang=php Vēl viena problēma Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\******\******\*********\lastcom.php on line 3 KODS: http://paste.php.lv/4719269f15de7109f8967c0c44ecff3f?lang=php Izmantoju AppServ. Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted October 8, 2011 Report Share Posted October 8, 2011 1. $eRes = mysql_query("SELECT * FROM ibf_member_extra WHERE id = $member[id]"); // Nevar arrayu likt! Pameiģini: $u_id = $member['id']; $eRes = mysql_query("SELECT * FROM ibf_member_extra WHERE id = '$u_id' "); 2. Tev nav nodefinēts: DB_prefix Quote Link to comment Share on other sites More sharing options...
FeNzIee Posted October 8, 2011 Author Report Share Posted October 8, 2011 1. $eRes = mysql_query("SELECT * FROM ibf_member_extra WHERE id = $member[id]"); // Nevar arrayu likt! Pameiģini: $u_id = $member['id']; $eRes = mysql_query("SELECT * FROM ibf_member_extra WHERE id = '$u_id' "); 2. Tev nav nodefinēts: DB_prefix Pirmais aizgāja :) Ka to otro saprast? Es esmu nulle tajos kodos atvaino :( Quote Link to comment Share on other sites More sharing options...
daGrevis Posted October 8, 2011 Report Share Posted October 8, 2011 define('DB_prefix', ''); Quote Link to comment Share on other sites More sharing options...
FeNzIee Posted October 8, 2011 Author Report Share Posted October 8, 2011 Es uzliku taja faila define('DB_prefix','prefix_'); bet nekas nemainas. Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted October 8, 2011 Report Share Posted October 8, 2011 pameiģini nomainīt prefix_ uz ibf_ Quote Link to comment Share on other sites More sharing options...
FeNzIee Posted October 8, 2011 Author Report Share Posted October 8, 2011 pameiģini nomainīt prefix_ uz ibf_ Mmhhmm diezvai jo tas ir foruma prefix bet mana datubazes ir visur prefix_commets un u.t.t. Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted October 8, 2011 Report Share Posted October 8, 2011 $c_res = mysql_query("SELECT * FROM " .DB_prefix. "comments ORDER BY date DESC LIMIT 5"); while($c_row = mysql_fetch_array($c_res)) { Quote Link to comment Share on other sites More sharing options...
FeNzIee Posted October 8, 2011 Author Report Share Posted October 8, 2011 Rekur es uzliku visu ka vaig,bet tik un ta neiet ! ;( <? define('DB_prefix','prefix_'); $c_res = mysql_query("SELECT * FROM " .DB_prefix. "comments ORDER BY date DESC LIMIT 5"); while($c_row = mysql_fetch_array($c_res)) { switch ($c_row['type']) { case "news": $url = main_WEB_URL."newss/".$c_row['parentID']; break; case "img": $url = main_WEB_URL."picture/".$c_row['parentID']; break; case "videos": $url = main_WEB_URL."video/".$c_row['parentID']; break; case "user": $url = main_WEB_URL."user/".$c_row['parentID']; break; } $c_row['comment'] = $main->bbcode->bbcode2zero($c_row['comment']); echo "<div class='lastcom'><div style='display:inline;text-decoration:none;'> <a href='$url'>".smaller($c_row['comment'], 15)."</a> </div></div><br />"; } ?> Quote Link to comment Share on other sites More sharing options...
Kemito Posted October 8, 2011 Report Share Posted October 8, 2011 Tev teica prefix_ nomainīt uz ibf_ ! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted October 8, 2011 Report Share Posted October 8, 2011 Tak vienkārši izņem to PREFIX konstanti ārā, ja tev nav prefiski tabulām. Dooh! Quote Link to comment Share on other sites More sharing options...
FeNzIee Posted October 9, 2011 Author Report Share Posted October 9, 2011 Tada ari ir problema man visam tabulam ir prefix Es uz IBF mainiju ari nekas nesanaca prefix_comments prefix_news un u.t.t. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted October 9, 2011 Report Share Posted October 9, 2011 prefix_comments prefix_news un u.t.t. Tie ir tabulu nosaukumi, īstie? Nu okeh, tagad definē prefiksu: define('PREFIX', 'prefix_'); Kā tā varētu būt... 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.