Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

How to filter data from a database

bloomer

Recruit
Basic Member
Messages
11
Reaction score
0
Points
16
Hi guys, hihingi ako ng tulong sa inyo para sa denidevelop ko na system.

Tanong ko sana kung paano ifilter and data galing sa database, kunyari meron akong table na studentrecord tapos may column or fields doon na ang
pangalan ay batch tapos may module ako na magmanipula ng batch ng studyante kunyari sakin batch namin ay 2016-2017 so ngayon sa student record mayroong 2014-2015 so since kami ang pina ka latest na batch ang dapat lang ididisplay ng table sa interface ay yung student na 2016-2017 yung 2014-2015 ay hindi ididisplay so mag mamatter sya sa batch para ma filter pero may status kami para sa batch na active or deactivate so pag sinilect ko ang active at batch na pinili ay 2016-2017 so kailangan yung active na 2016 o 2017 lang ang madidisplay sa table ng interface.


Yan lang po sa ngayun....sana po matulungan nyo ako. Maraming salamat po!
 
gulo ng explenation mo pero mejo nagets ko naman ahaha. .

gamit ka ng select tpos between mo. . staka kung mag bigay ka ng gnyan magpakita ka ng sample out put.
 
gulo ng explenation mo pero mejo nagets ko naman ahaha. .

gamit ka ng select tpos between mo. . staka kung mag bigay ka ng gnyan magpakita ka ng sample out put.

haha kahit ako nga rin medyo hindi pa klaro kaya nangongolekta ako ng idea sa inyo baka mabuo ang hinahanap ko. Ano kasi yan bro para rin yang inventory yung status na pending o active parang ganun.
 
kung ang laman ng batch mo ay single year lang, kunwari 2014, 2015, 2016:
$yrfrom = 2014;
$yrto = 2015;
Gamitan mo ng WHERE batch between '".$yrfrom."' AND '".$yrto."' AND status = Active
sa select statement mo.
 
Last edited:
gawa ka nanalng ng query statement na may search query
example

function getData($year)
{
//sample code
// select * from `table` where `tbl_year` = $year
}

i parameterized mo para flexible siya
 
Back
Top Bottom