close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to generate multiple .zip file in a loop base on a filtered result in array

Thread began 4/17/2022 10:46 pm by Rokon | Last modified 4/19/2022 7:38 am by Rokon | 334 views | 6 replies

Rokon

Originally Said By: Ray Borduin
  I think you need another while loop for the $mainHadith recordset results.  



Am I doing right or wrong, I am confused as I am getting Fatal error: Out of memory error. Pls help.

php:
<?php

require_once('../Connections/hadithbd.php'); ?>
<?php 
require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$filterHadithBooks 
= new WA_MySQLi_RS("filterHadithBooks",$hadithbd,0);
$filterHadithBooks->setQuery("SELECT hadithbook.BookID FROM hadithbook WHERE hadithbook.Active = 1 ORDER BY hadithbook.priority ASC");
$filterHadithBooks->execute();
?>
<?php
while (!$filterHadithBooks->atEnd()) {
?>
<?php
$mainHadith 
= new WA_MySQLi_RS("mainHadith",$hadithbd,0);
$mainHadith->setQuery("SELECT hadithmain.HadithID AS hadithID, hadithmain.HadithNo AS hadithNumber, hadithmain.hadithNo2 AS hadithNumber2, hadithmain.hadithNo3 AS hadithNumber3, hadithmain.ArabicHadith AS arabicHadithTashkeel, hadithmain.ArabicHadithNew AS arabicHadithNoTashkeel, hadithmain.BanglaHadith AS banglaHadith, hadithmain.EnglishHadith AS englishHadith, hadithmain.HadithNote, hadithbook.BookNameBD AS bookNameBangla, hadithchapter.ChapterBG AS hadithChapterBangla, hadithchapter.ChapterAR AS hadithChapterArabic, hadithchapter.ChapterEN AS hadithChapterEnglish, hadithexplanation.explanation AS hadithExplanation, hadithlearning.hadithinfo AS learningFromHadith, hadithstatus.StatusID, hadithstatus.StatusBG, rabihadith.rabiBangla, hadithsection.SectionBD FROM hadithmain LEFT OUTER JOIN hadithbook ON hadithmain.BookID = hadithbook.BookID LEFT OUTER JOIN hadithchapter ON hadithmain.chapterID = hadithchapter.chapID LEFT OUTER JOIN hadithexplanation ON hadithmain.HadithID = hadithexplanation.hadithID LEFT OUTER JOIN hadithlearning ON hadithmain.HadithID = hadithlearning.hadithID LEFT OUTER JOIN hadithstatus ON hadithmain.HadithStatus = hadithstatus.StatusID LEFT OUTER JOIN rabihadith ON hadithmain.RabiID = rabihadith.rabiID LEFT OUTER JOIN hadithsection ON hadithmain.SectionID = hadithsection.SectionID WHERE hadithmain.HadithActive = 1 AND hadithmain.BookID = ? ORDER BY hadithmain.HadithNo ASC");
$mainHadith->bindParam("i""".($filterHadithBooks->getColumnVal("BookID"))  ."""-1"); //WAQB_Param1
$mainHadith->execute();
?>
<?php
while (!$mainHadith->atEnd()) {
?>
<?php
  $filterHadithBooks
->Results[$filterHadithBooks->Index]["Book"] = $mainHadith->Results;
  
$filterHadithBooks->moveNext();
}
?>
<?php
  $mainHadith
->Results;
  
$mainHadith->moveNext();
}
?>

<?php
header
("Content-Type: application/json; charset=UTF-8");
$json json_encode($mainHadith->ResultsJSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);

?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...