FT3
Reģistrētie lietotāji-
Posts
183 -
Joined
-
Last visited
Everything posted by FT3
-
itka ta ? <form method="post" action="?go=search"> <input type="text" name="search" /> <input type="submit" name="search" value="OK" /> </form> tavs kods ! <?php $searcharray=explode(" ",substr($_GET['search'],0,50)); foreach($searcharray as $word){ $searchstring.="+".$word."* "; } $searchstring=check_input($searchstring); $q=sprintf("SELECT * FROM movie WHERE MATCH (title) AGAINST (%s IN BOOLEAN MODE)", $searchstring); $result=mysql_query($q); ?> met erroru Fatal error: Call to undefined function check_input() in C:\AppServ\www\modules\search.php on line 7
-
un ka lai ar input ? :D jo es nesaprotu neko no funkcijam :D un uz 7linijas erros Fatal error: Call to undefined function check_input() in C:\AppServ\www\modules\search.php on line 7
-
Mekleju google neko atrast nevareju ka lai ustaisit search scriptu ? :)
-
ka lai ustaisa lai refresh taisitos 2 reiz ? <meta http-equiv='refresh' content='javascript:location.reload(true)'> atrisinats :D
-
hmm uzrada šo ;/ You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to = '1' ORDER by id LIMIT 1' at line 1 palidziet vel šo plizzz , vairs jautajumu nebus ;/
-
Kļuda Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\includes\message.php on line 4 kods <?php $result = mysql_query("SELECT * FROM messages WHERE to = '{$_SESSION['wID']}' ORDER by id LIMIT 1"); while($row = mysql_fetch_array($result)) { echo $row['from'] . " " . $row['text']; echo "<br />"; } ?>
-
vel viens jautajums ! Parse error: syntax error, unexpected T_VARIABLE in C:\AppServ\www\includes\message.php on line 2 $result = mysql_query("SELECT * FROM messages WHERE to = '"$_SESSION['wID']"' ORDER by id LIMIT 1");
-
vai kads varetu man pateiks kas ši ir pa kļudu ? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, text) VALUES ('1', '1', 'aaaa')' at line 1 kods ir tads ! <?function add(){ ?> <form action="" method="POST" > <textarea class="commFl" rows="8" cols="30" name="text"></textarea> <input type="submit" name="aiziet" value="Pievienot!"> </form> <?} if ($_POST['aiziet']) { $id = $_GET['id']; $from = $_SESSION['wID']; $text = $_POST['text']; if (($text != "")) { ?> <b>Done!</b> <? mysql_query("INSERT INTO message (id, from, text) VALUES ('$id', '$from', '$text') ") or die(mysql_error()); }}else{add();} ?>
-
nu paldiziet ka lai izlabot ;( :( ko janomaina uz ko ? :/
-
neko nesaprotu xD es neesmu pro php + mysql koderis , tpc ari lietoju php.lv/f/ lau uzinatu atbildes , un ko uz ko izlabot ;/
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 1 izvada šo
-
<H2>Список Фильмов</h2> <div id=hcontent> <table width=100%> <?php include 'includes/connect.php'; if(!isset($_GET['page'])){ $page = 1; } else { $page = (int)$_GET['page']; } $max_results = 1; $from = (($page * $max_results) - $max_results); if(isset($_GET['cat'])){ $sql=mysql_query("SELECT * FROM movie WHERE category = '".(int)$_GET['cat']."' ORDER by id LIMIT $from, $max_results"); }else{ $sql=mysql_query("SELECT * FROM movie ORDER BY id LIMIT $from, $max_results"); } while($row = mysql_fetch_array($sql)){ // Nak visa draza ara tiesi seit. echo "<tr><td><img src='../style/icons/"; echo $row['category']; echo ".gif'></td>"; echo "<td>"; echo $row['title']; echo "</td>"; echo "<td><a href='?go=view-movie&id="; echo $row['id']; echo "'>Просмотор</a></td></tr>"; } if(isset($_GET['cat'])){ $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM movie WHERE category = '".(int)$_GET['cat']."'"),0); }else{ $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM movie"),0); } $total_pages = ceil($total_results / $max_results); echo "<table><tr>"; if(isset($_GET['cat'])){ for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "<td><span class='page_numbers'>$i</span></td>"; } else { echo "<td><a class='page_numbers' href=\"".$_SERVER['PHP_SELF']."?go=movie&cat=".(int)$_GET['cat']."&page=$i\">$i</a></td>"; } } }else{ for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "<td><span class='page_numbers'>$i</span></td>"; } else { echo "<td><a class='page_numbers' href=\"".$_SERVER['PHP_SELF']."?go=movie&page=$i\">$i</a></td>"; } } } echo "</tr></table>"; ?> </table> </div> links irs šads ?go=movie&page=2 bet ja uzliek ?go=movie&page=a vai ?go=movie&page=56456754 uzrada eroru ka lai to izlabot , piem "tada lapa neeksiste !" erora vieta ;)
-
viss tnx par meklešanas tagiem lieta atrisinata ;DDDDD
-
bet es nezinu ka lai vinus apvienot jo man vel if(isset($_GET['cat'])){ $result=mysql_query("SELECT * FROM movie WHERE category = '".(int)$_GET['cat']."' ORDER by id"); }else{ $result=mysql_query("SELECT * FROM movie ORDER BY id"); }
-
Kads nevaretu pievienot sadalisanas pa lapam scriptu Mans Kods <?php require("includes/connect.php"); if(isset($_GET['cat'])){ $result=mysql_query("SELECT * FROM movie WHERE category = '".(int)$_GET['cat']."' ORDER by id"); }else{ $result=mysql_query("SELECT * FROM movie ORDER BY id"); } while($row = mysql_fetch_array($result)) { echo "<tr><td><img src='../style/icons/"; echo $row['category']; echo ".gif'></td>"; echo "<td>"; echo $row['title']; echo "</td>"; echo "<td><a href='?go=view-movie&id="; echo $row['id']; echo "'>Просмотор</a></td></tr>"; } ?> mekleju google neko ipašu neesmu atradis ;/
-
ja man šaja koda tieši tapats uzlikts tnx par to GET ;)
-
pie izvades nomainiju bet if(isset($_GET['cat'])){ $result=mysql_query(blablabla ar cat); }else{ $result=mysql_query(blablabla bez cat); } šaja koda nau jamaina ?
-
a ka lai taisa lai neko nenograuž ? :D :D