Jump to content
php.lv forumi

Par stulbo MySQL 4.1


Grabber

Recommended Posts

Probleema iisumaa:

 

Ieinstaleeju sekojoshas lietas: Apache 1.3.27, PHP 4.3.9, MySQL Server 4.1.

Ja agraak uz vecaa MySQL 4.0.17 viss bija chikiniekaa, tad tagad jamais 4.1 bljaustaas tipa: "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in index.php on line 13", pie kam line 13 ir taada:

$txt = mysql_fetch_array(mysql_query("select name$ln as name, is_active from menu where id=" . $_GET["click"]));

 

Kaa arii naakamais MySQL apspljaudaamais objekts ir rindinja "while":

 

<?
 if (isset($_GET["click"]))
   $click_id = $_GET["click"];
 else {
   $row = mysql_fetch_array(mysql_query("select id from menu where is_active='yes' and is_default='yes'"));
   $click_id = $row["id"];
 }
 $sql = "select id, name$ln as name, is_default from menu where parent_id=%s and is_active='yes' order by pos";
 $result = mysql_query(sprintf($sql, 0));
 while ($row = mysql_fetch_array($result)) {
     printf("<td background=\"img/but.gif\" width=\"10\" height=\"10\" class=\"menu%s\" onClick=\"location.href='%s'\">%s<br>%s</td>\n",
     ($click_id == $row["id"] ? "2" : "1"), "?go=$ln&click=".$row["id"], $row["name"], ($click_id == $row["id"] ? "" : ""));
 }
?>

 

Kaa ieteiksiet risinaat?

 

Pats interesantaakais ir tas, ka pat ljoti gribot dabuut atpakalj MySQL 4.0.17 vai arii 4.0.22 to nesanaak izdariit, jo AUTOEXEC.NT ieksh system32 mapes bljaustaas, ka shitaadus failus vinjsh kapaa redzeejis - kirdik, palaist negrib. Tad kaadaa rakaa es dabuuju pirmo reizi uz taas WinXP kastes jamo 4.0.17? Moshka kaadam arii shitaada nelaime ir bijusi un var padaliities pieredzee - tjip -> ko tagad dariit?

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...