PacStyle Posted June 16, 2009 Report Share Posted June 16, 2009 taisu ircphp botu.. un itkā uzrakstot komandu .akna parāda vārdu dienu tajā datumā, bet ja raksta otru reizi - nerāda.. Kods: if ($komanda[0] == ".akna") { while($linija = mysql_fetch_assoc($konee)){ $m = date("m"); $d = date("d"); if (($m == $linija[menesis]) && ($d == $linija[datums])) { socket_write($socket, "NOTICE $nick :Varda dienu svin \002 $linija[vards]\n"); } else { socket_write($socket, "NOTICE $nick :\002Sviests... Datubāzē laikam nav ieliktas visas vardadienas!\n"); } } } Link to comment Share on other sites More sharing options...
bubu Posted June 16, 2009 Report Share Posted June 16, 2009 Kas ir $konee ? (kodam jālieto CODE nevis QUOTE bbtags) Link to comment Share on other sites More sharing options...
PacStyle Posted June 16, 2009 Author Report Share Posted June 16, 2009 $konee = mysql_query("SELECT * FROM vardadienas", $konetejamies) or socket_write($socket, "PRIVMSG $channel :MYSQL KLJUDA\n"); Link to comment Share on other sites More sharing options...
PacStyle Posted June 16, 2009 Author Report Share Posted June 16, 2009 (edited) tikko secināju, ka pēc liela laika intervāla ir iespēja saņemt info. velreiz.. atvainojos mana kļūda.. atradu viņu! Edited June 16, 2009 by PacStyle Link to comment Share on other sites More sharing options...
Recommended Posts