Snaip3Rs Posted June 1, 2009 Report Share Posted June 1, 2009 Es atkal vēršos pie jums jo meklēju forumā neatradu, bet man atsūtija draugs šādu bet tāpat kļūda ir uz 30 rinda bet kas par kļūdu nesaprotu! Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/jzvac/public_html/chat.php on line 30 <?php mysql_connect("localhost","jzvac","1991"); mysql_select_db("jzvac"); $rez=mysql_query("SELECT * FROM tabula ORDER BY lauks"); ?> <?php $selekts=mysql_query("SELECT * FROM ibf_sessions WHERE member_id=".$_COOKIE['member_id']); while($r=mysql_fetch_array($selekts)) { if(isset($_POST['ierakstiit'])) { $ieraksts=$_POST['ieraksts']; $laiks=time(); $membera_niks=$r['member_name']; mysql_query("INSERT INTO chats (ieraksts, laiks, niks) VALUES ('$ieraksts','$laiks','$membera_niks')"); } } //Shaadu paarbaudi silti neiesaku lietot :) if($_COOKIE['member_id'] > 0) { echo ' <form action="" method="post"> <input type="text" name="ieraksts" /> <input type="submit" name="ierakstiit" /> </form> '; } //Un visbeidzot pats selekts $dati=mysql_query("SELECT * FROM chats ORDER BY laiks DESC"); while($er=mysql_fetch_array($dati)) { echo $er['niks']."<br />".$er['ieraksts']."<br />"; } ?> Quote Link to post Share on other sites
marcis Posted June 1, 2009 Report Share Posted June 1, 2009 mysql_query($query)or die(mysql_error()); Quote Link to post Share on other sites
Snaip3Rs Posted June 1, 2009 Author Report Share Posted June 1, 2009 man nesanāca kā viņš jāliek? parādi scriptā lūdzu ja vari! Quote Link to post Share on other sites
gaziks52 Posted June 1, 2009 Report Share Posted June 1, 2009 $dati=mysql_query("SELECT * FROM chats ORDER BY laiks DESC") or die (mysql_error()); Quote Link to post Share on other sites
Snaip3Rs Posted June 2, 2009 Author Report Share Posted June 2, 2009 Kā var ielikt tabulu man rāda šādu kļūdu! Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/jzvac/public_html/chat.php on line 11 Table 'jzvac_db.chats' doesn't exist kad var izlabot šo skriptu vai iedot citu gatavu kas saistīts ar ipb! Quote Link to post Share on other sites
anonīms Posted June 2, 2009 Report Share Posted June 2, 2009 izlabot var tā, ka vajag izveidot tabulu chats. Quote Link to post Share on other sites
Snaip3Rs Posted June 2, 2009 Author Report Share Posted June 2, 2009 a vari lūdzu izlabot un salabot! Quote Link to post Share on other sites
kechums Posted June 2, 2009 Report Share Posted June 2, 2009 Fail :D Savā db pārvaldniekā uztaisi tabulu chats (šajā gadījumā būtu visai izdevīgi taisīt zem ipb db) un attiecīgos laukus, kuri tur parādās: laiks, niks, ieraksts. Quote Link to post Share on other sites
Puika1 Posted June 4, 2009 Report Share Posted June 4, 2009 ipb datubaze uztaisiju tabulu sadi izskatas CREATE TABLE `chats` ( `ieraksts` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL , `laiks` DATE NULL , `niks` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL ) ENGINE = MYISAM ; bet palubom nestrada šāds eror Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\web\mon2.php on line 11 Quote Link to post Share on other sites
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.