raimis58 Posted February 27, 2009 Report Share Posted February 27, 2009 Sveiki... Tatad maza problema ielogojoties paraadas: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\appserv\www\includes\siteconfig.inc.php on line 5 No database selected Kr4 siteconfig.inc.php iekshas... <?php $myDb->connect(); $sql = "SELECT * FROM yob_site WHERE id='1'"; $result = mysql_query($sql); $row = mysql_fetch_array($); DEFINE ("", $row["Lati"]); DEFINE ("SITESLOGAN", $row["siteslogan"]); DEFINE ("SITE_URL", $row["url"]); DEFINE ("ENABLE_FORUMS",$row ["enableforums"]); DEFINE ("FORUM_LINK",$row ["forumlink"]); $myDb->close(); ?> Gribetu uzzinat, kas jaizdara lai varetu bez Warningiem ielogoties... Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 27, 2009 Report Share Posted February 27, 2009 izpildi: $myDb->select_db("TavasDBnosaukums"); uzreiz pēc: $myDb->connect(); Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 27, 2009 Report Share Posted February 27, 2009 Gribetu uzzinat, kas jaizdara lai varetu bez Warningiem ielogoties... Jauzraksta normals kods ;) Bet ja nopietni.. nekur nemaniju ka tev buutu noradiits Username/ Hostname/ un parole.. Bez shiem triis nu nekaadi ... Quote Link to comment Share on other sites More sharing options...
raimis58 Posted February 27, 2009 Author Report Share Posted February 27, 2009 Vnk, esmu iesacejs maz veel saprotu, tapec prasu... Kur tad vis jaraxta iisti ?? Quote Link to comment Share on other sites More sharing options...
raimis58 Posted February 27, 2009 Author Report Share Posted February 27, 2009 izpildi:$myDb->select_db("TavasDBnosaukums"); uzreiz pēc: $myDb->connect(); nesapratu Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 27, 2009 Report Share Posted February 27, 2009 <?php $myDb->connect(); // ŠEIT. $sql = "SELECT * FROM yob_site WHERE id='1'"; $result = mysql_query($sql); $row = mysql_fetch_array($); DEFINE ("", $row["Lati"]); DEFINE ("SITESLOGAN", $row["siteslogan"]); DEFINE ("SITE_URL", $row["url"]); DEFINE ("ENABLE_FORUMS",$row ["enableforums"]); DEFINE ("FORUM_LINK",$row ["forumlink"]); $myDb->close(); ?> Quote Link to comment Share on other sites More sharing options...
raimis58 Posted February 27, 2009 Author Report Share Posted February 27, 2009 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\appserv\www\includes\siteconfig.inc.php on line 6 No database selected Atkal kkas nav :( cits errors Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 27, 2009 Report Share Posted February 27, 2009 Kāds tad tas kods izskatās šobrīd, kuru izpildi? Quote Link to comment Share on other sites More sharing options...
raimis58 Posted February 27, 2009 Author Report Share Posted February 27, 2009 <?php $myDb->connect(); // $myDb->select_db("lati"); $sql = "SELECT * FROM yob_site WHERE id='1'"; $result = mysql_query($sql); $row = mysql_fetch_array($row); DEFINE ("", $row["Lati"]); DEFINE ("SITESLOGAN", $row["siteslogan"]); DEFINE ("SITE_URL", $row["url"]); DEFINE ("ENABLE_FORUMS",$row ["enableforums"]); DEFINE ("FORUM_LINK",$row ["forumlink"]); // $myDb->select_db("lati"); $myDb->close(); ?> Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 27, 2009 Report Share Posted February 27, 2009 noņem tās divas slīpsvītras pirms $myDb->select_db Tās biju ielicis tikai tādēļ, ka vārds "ŠEIT" nav PHP komanda un tādēļ, lai būtu zolīdi ir jāaizkomentē ;) 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.