jonass Posted October 25, 2003 Report Share Posted October 25, 2003 <? $db = mysql_connect("adrese","usr","pass"); mysql_select_db("table","$db"); $res = mysql_query("select sss from table"); ?> man izmet: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in E:testimysql1.php on line 3 kaapeec taa? Link to comment Share on other sites More sharing options...
Roze Posted October 25, 2003 Report Share Posted October 25, 2003 Nu a tev piesleedzas normaali? Pie kam principaa nevaig taisiit $db = mysql_connect() to izmanto tikai tad ja vienlaiciigi nepiecieshams piesleegties vairaakiem MySQL serveriem. Pietiek shaadi mysql_connect($hostname,$dbUser,$dbPass); mysql_select_db($dbName); Link to comment Share on other sites More sharing options...
K|NG Posted October 25, 2003 Report Share Posted October 25, 2003 es te tik taa nedaudz piebidiishu; iesaku lietots md5(); :) Link to comment Share on other sites More sharing options...
Kaklz Posted October 26, 2003 Report Share Posted October 26, 2003 <?$db = mysql_connect("adrese","usr","pass"); mysql_select_db("table","$db"); $res = mysql_query("select sss from table"); ?> man izmet: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in E:testimysql1.php on line 3 kaapeec taa? pie mysql_select_db nevaig likt $db peedinjaas, tad viss buus ok. .. Tev tiek prasiits parametrs MySQL konekcija, bet shaadaa veidaa tu iedod vinjam kaut kaadu stringu, kas labaakajaa gadiijumaa satur mysql konekcijas kaut kaadu informaaciju. Tb, tam jaaizskataas shitaa: <? $db = mysql_connect("adrese","usr","pass"); mysql_select_db("table",$db); $res = mysql_query("select sss from table"); ?> protams, paliek speekaa arii tas, ko Roze ieteica ;) Link to comment Share on other sites More sharing options...
MZM Posted October 29, 2003 Report Share Posted October 29, 2003 A vaitad to $db peectam nav ieteicams iebarot mysql_close($db) ? Es tik iesaaceejs ;) Link to comment Share on other sites More sharing options...
Roze Posted October 30, 2003 Report Share Posted October 30, 2003 A vaitad to $db peectam nav ieteicams iebarot mysql_close($db) ? Es tik iesaaceejs ;) Nav obligaati.. eertiibas labad (un lietotaaju slinkuma laapiishanai) peec scripta izpildes beigaam php pats aizver konekciju (kaadreiz taa nebija). Link to comment Share on other sites More sharing options...
Recommended Posts