Jump to content
php.lv forumi

Problema! Palidziba steidzigi vaidziga! :(


FeNzIee

Recommended Posts

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.

Link to comment
Share on other sites

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 :(

Link to comment
Share on other sites

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 />";
}
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...