PHP - Moved: Sql Hellp Need Please
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=357483.0 Similar TutorialsWhat i trying to do is make search with multiple check boxes here is may error im get Code: [Select] Please try again later or contact an Administrator. (1064) 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 'Inner Join rasta_cinema_categories AS r ON cat = r.cat WHERE upper() LIKE'%%'' at line 2 SELECT `video_id`, `name`, `description`, `video_name`, `thumb_image`, `release`, `cat`, `format`, `imbd_url`,`added`, `recomended` ,`sticky`, `owner`, `clicks` FROM `rasta_cinema` AS Inner Join rasta_cinema_categories AS r ON cat = r.cat WHERE upper() LIKE'%%' and here is the code Code: [Select] $searching = (isset($_POST['searching']) ? $_POST['searching'] : ''); if ($searching =="yes") { $paieska = (isset($_POST['find']) ? $_POST['find'] : ''); if ($paieska == "") { $klaida = '<div class="error" id="show_error">You forgot to enter a search term</div>'; } $checkbox = $_POST['cat']; if ($checkbox !='') { $extra = " and `cat` IN(". explode(', ',$checkbox) . ")"; } $cinema = ''; $filmai = $TSUE['TSUE_Database']->query("SELECT `video_id`, `name`, `description`, `video_name`, `thumb_image`, `release`, `cat`, `format`, `imbd_url`,`added`, `recomended` ,`sticky`, `owner`, `clicks` FROM `rasta_cinema` AS Inner Join rasta_cinema_categories AS r ON cat = r.cat WHERE upper($field) LIKE'%$paieska%'".$extra); $numrows = mysqli_num_rows($filmai); if($numrows == 0) { $klaida = '<div class="error" id="show_error">Nothing found</div>'; } while ($row = mysqli_fetch_array($filmai)) { $cinema_row = ''; $id = $row['video_id']; $name = $row['name']; $description = $row['description']; $video_name = $row['video_name']; $thumb = $row['thumb_image']; $release = $row['release']; $format = $row['format']; $imbd_url = $row['imbd_url']; $cat = $row['cat']; $owner = $row['owner']; $clicks = $row['clicks']; $data = date('Y-m-d H:i:s',$row['added']); $nujo = $row['recomended']; $sticky = $row['sticky']; $free = ""; if ($row['recomended'] == 1){ $free = '<img title="Recomended" src="/cinema/images/heart.png"/>'; } $sticky = ""; if ($row['sticky'] == 1){ $sticky = '<img title="Sticky" src="/cinema/images/pin.png"/>'; } $recomended = ''; $recomended = $free.$sticky; eval("\$cinema_row = \"".$TSUE['TSUE_Template']->LoadTemplate('cinema_row')."\";"); $cinema .= $cinema_row; } } Hello im just beginner on this side. Here what im trying to do but not successful Code: [Select] SELECT m.memberid, p.memberid, p.uploaded, p.downloaded, p.total_posts, p.invites_left, p.points FROM tsue_members m, tsue_member_profile p WHERE p.memberid=m.memberid query work but i want to get memberid diferent for every member Say im logged im see my stats user logged hes see hes stats. Thanks Hello im geting this error what im ding wrong? Code: [Select] PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/admincom/public_html/tsue/library/plugins/movie_plugin.php on line 7 line 7 is: while ($row = mysqli_fetch_array($sql)) { code he Code: [Select] $query = mysqli_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB); $sql = mysqli_query($query, "SELECT `membername`, `filename`, `tid`, `info_hash`, `name`, `description`, `cid`, `size`, `added`, `leechers`, `seeders`, `times_completed`, `owner`, `options`, `nfo`, `sticky`, `flags`, `mtime`, `ctime`, `download_multiplier`, `upload_multiplier` FROM `tsue_members`, `tsue_torrents`, `tsue_attachments` WHERE `memberid`='owner' AND `content_type`='torrent_images' AND `content_id` = `tid` LIMIT 0, 10"); while ($row = mysqli_fetch_array($sql)) { $movie_plugin_row = ''; $uploader = $row['membername']; $description= $row['description']; $dydis= $row['size']; $name= $row['name']; $leechers= $row['leechers']; $owner= $row['owner']; $filename= $row['filename']; $nunx= $row['tid']; $seeders= $row['seeders']; eval("\$movie_plugin_row = \"".$TSUE['TSUE_Template']->LoadTemplate('movie_plugin_row')."\";"); $movie_plugin .= $movie_plugin_row; } Hello need some help keep getting Code: [Select] [function.readfile]: failed to open stream: No such file or directory in code im use Code: [Select] // Ziper function zipFilesAndDownload($file_names,$archive_file_name,$file_path){ $zip = new ZipArchive(); //create the file and throw the error if unsuccessful if ($zip->open($archive_file_name, ZIPARCHIVE::CREATE )!==TRUE) { exit("cannot open <$archive_file_name>\n"); } //add each files of $file_name array to archive foreach($file_names as $files) { $zip->addFile($file_path.$files,$files); } $zip->close(); $zipped_size = filesize($archive_file_name); header("Content-Description: File Transfer"); header("Content-type: application/zip"); header("Content-Type: application/force-download");// some browsers need this header("Content-Disposition: attachment; filename=$archive_file_name"); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header("Content-Length:". " $zipped_size"); ob_clean(); flush(); readfile($archive_file_name); unlink($archive_file_name); // Now delete the temp file (some servers need this option) exit; } if(isset($_POST['formSubmit'])) { //$file_names=$_POST['items'];// Always sanitize your submitted data!!!!!! //$file_names = filter_var_array($_POST['items']);//works but it's the wrong method $filter = filter_input_array(INPUT_POST, FILTER_SANITIZE_SPECIAL_CHARS) ; $file_names = $filter['items'] ; //Archive name $archive_file_name = 'images.zip'; //Download Files path $file_path= getcwd(). ''.$baseurl.'/cinema/'; //cal the function zipFilesAndDownload($file_names,$archive_file_name,$file_path); } html Code: [Select] <form method="post"> <input type="checkbox" name="items[]" value=" href="{$baseurl}/data/images/s/{$filename}"/> </form> Please help This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=353027.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356314.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=305825.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328845.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=327250.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=333865.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=331097.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342919.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318277.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=345722.0 This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=319595.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309960.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318465.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=343318.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=317014.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=349322.0 |