PHP-and-MySQL/C3/MySQL-Part-5/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Ngi pdiangsngewbha ia phi sha ka bynta basan jong ka mySQL. Ban echo ia ka data jong ngi sha u user bad ban pyni ia ki results na kane, ngin hap ban pyndonkam ia ka while statement.
00:12 Kumba nga lah ong, ngi lah dep shna ia u $row variable bad kane kadei ka "= mysql_fetch_assoc".
00:21 Kane ka shna ia ka associative array na ka "extract" query jong ngi kaba don hangne.
00:27 Te ngi ia jied lut baroh ha ka "people" table bad pynbeit ia ki da ka "id" ha ka ascending order.
00:33 Hapoh jong ka while, namar ba ngi lah thoh $row kum ka array bad kadei ka associative array, row[0] kan dei ba bakla namar kine kidei ki numeric.
00:46 Kine kidei ki numeric id tags bad ha ka jaka jong kane ngin pyndonkam ia ki kyrteng jong ki fields jong ngi, namar kane kadei ka associative.
00:59 Te, ha ka jaka jong 0, 1, 2, 3, 4 ngin pyndonkam ia ka kyrteng badei.
01:05 To ngin shna ia ki variables na kane. To ngin ong $id bad nangta $firstname equals, ngi ia pyndonkam lynter ia kajuh ka structure.
01:15 Te, ka suk bha ban copy bad paste ia kane.
01:19 To ngin indent ia kane.
01:24 Te baroh ngi don 5.
01:28 Te katei kadei san bad nangta to ngin shu pynkylla. Kane kadei ka kam jaituh!
01:34 Tangba ka kham stet shibun ban leh ha kane ka rukom.
01:38 Te, $lastname bad ngi don ia ka date of birth ($dob). Ngi don ruh ia ka $gender.
01:47 Ngi don baroh ki data jong ngi bad mynta kumno ngin pyndonkam ia kane.?
01:51 Ngi donkam ban pyndonkam ia ka echo command.
01:55 Ka lah ban don ka loop hapdeng, ha kane ka khyllipmat. Te, kaei kaei ba ngi echo kan sa iaid biang.
02:02 Baroh ki record ngi ong bad kata ruh kadei. Ngi leh shi leh ia kane ka code.
02:07 Kum ka nuksa, Ngan ong "Text" hangne. Kidon 4 tylli ki records.
02:13 Hadien ba lah refresh ia kane ka page, phi dei ban ioh Text ba la echo 4 sien.
02:18 Da kaba type 4 sien, kane ka dkhot jong u code hangne, ka thew ia baroh ki loop.
02:24 Na kata ka daw ngi lah ban pynrung, kum ka nuksa, $id lane $firstname lane kawei pat, kaba ngi lah sei na ka database da kaba pyndonkam ia ka associative array.
02:36 Mynta ngan thoh : $firstname $lastname la kha ha ka $dob for date of birth bad kadei bad ngan buh ia ka $gender hangne hajrong .
02:49 Khlem da klet ia ka line-break jong ngi. Ngan refresh ia ka page jong ngi.
02:54 Nangta ngi don ia ka set jong ka data jong ngi ba la structure da kaba pyndonkam ia ki kyrteng jong ki variables.
02:59 Ngi lah ai ha ka order badei bad kumjuh ruh lah leh shi leh na ka bynta baroh ki record ba ngi don.
03:08 Te, ngi dang shu dep ai ia ka content jong ka table jong ngi da kaba pyndonkam ia une u star, ba la declare da une u asterisk, ha kaba ka lum ia baroh ki single data ha baroh ki record.
03:22 Mynta to ngan leh ia kane, Ngan ong if $gender== "F" te $gender= "Female" .
03:39 Ka spelling ba dei jong katei bad nangta to ngin ong else $gender= "Male". Kane kadei tang ban shu thoh biang ia u variable katkum u value.
03:50 Lada ngi refresh mynta, ngi lah ban iohi ba kane ka lah kylla sha shynrang Male bad kynthei Female. Ngi don ruh katto katne ki rukom ba sngewtynnad ban pyni ia kane ka data.
04:00 Ha kane ka khyllipmat, nga jied na ka people table bad pynbeit da ka id bad ha ka ascending order.
04:07 Nga lah ruh ban pynbeit da ka descending id. Phi lah ban iohi ba kine ki pynkhih kylleng kylleng ia kane ka data .
04:15 Ngi lah ruh ban order ia ka da ka firstname. Kane kan buh ia kane ha ka descending alphabetical order bad ascending kan buh ia kane ha ka ascending alphabetical order.
04:33 Te, ngi ioh A, D, E, bad K.
04:36 Phi lah ban leh kumjuh bad ka surname.
04:39 Phi lah ban leh kumjuh bad kiei kiei. Wat bad ka date of birth , katba phi dang kynthup ia kane hangne.
04:46 Sa kawei pat ka kam ban leh kadei, to ngan shu pynphai biang ia kane sha ka id bad don ia kane kum ka descending. Ngi lah ban pyndonkam ia kane ka LIMIT 1 lane ngi lah ban ong LIMIT 2, 3 lane 4.
04:58 Mynta ngan ong LIMIT 1 na ka bynta ka jingthmu jong kane.
05:00 Mynta to ngin don 1 ban ailad ia u user jong ka page ban tip ia u briew bakhatduh ba lah pynrung ha kane ka table.
05:11 Te nga ong echo hangne.
05:16 echo "Last person to be inserted into table was..." bad ngan ieh ia kane kumtei bad pyndap ia ka

line-break.

05:27 Ngan shu echo ia ka first bad last name. Biang .
05:33 Te, hangne ngi lah ban iohi kidon shibun ki jingkulmar.
05:38 "Last person to be inserted.." kadei, ha ka jingshisha ka treikam!
05:43 Kane lah type ha ka "LIMIT" command.
05:46 Kaba nga leh kadei da kaba limit ia kane da 1 ha ka descending order jong ka id – ka id kadei incremental – nga ioh 4 hajrong bad lada ngi ia limit ia kane da 1, 4 kan dei tang kawei ka record kaba lah dep jied.
06:01 Na kata ka daw, u briew ba khatduh ha ka table , katkum ka record ba khatduh ba la pyni, kan don ia u value ba echo.
06:09 Kane ka while kan pynphai tang uwei u data value.
06:13 Namar ba ngi ia pynphai uwei u data value hangne, ngi lah kulmar da kine.
06:18 Kane kadei kawei ka command hangne, SELECT asterisk (*) FROM "people" , ORDER BY id DESC kadei sa kawei bad LIMIT 1 Kadei sa kawei.
06:27 Ngim pyndonkam commas lane eiei. Kane kadei tang kumno ngin thoh ia u code jong ngi hapoh ka query jong ngi.
06:34 Te, tang ban test ia kane – ngan pynrung tang ban pyndonkam ia ka Insert function ha php MyAdmin bad ngan pynrung sa kawei pat ka record.
06:45 Kum ka nuksa, to ngin type "David Green" bad ka date of birth jong ngi ka lah ban dei kaei kaei.
06:55 Kam don jingpher eiei kaba ngi type hangne. Ngi ong Male.
07:00 Nga wan hangne hapoh bad submit ia kane ka data.
07:02 Nion ha Browse bad ngi don ia u value ba thymmai hangne.
07:06 Haba ngi wanphai hangne bad refresh, katei kan kylla sha "David Green".
07:10 Te, kane ka long iarap bha bad lada phi don ia ka website ha kaba phi ia buh videos lane ki dur shimet.
07:17 Phi lah ban shu buh ia kaba khatduh kaba u user u lah pynrung.
07:21 Lane u briew bakhatduh ba lah dep register ha ka website jong phi lane kaei kaei.
07:30 Ka jinglah ban pyndonkam ia kane kam kut.
07:33 Barabor kumno ban echo ia ka data bad kumno ban manipulate ia ka da kaba shu pyndonkam ia ka mysql query.
07:44 Ha ka bynta babud, ngin ailad ia u user jong ngi ban specify kano ka data ki kwah ban pyni.
07:50 Ngin shna katto katne ki html forms ban ailad ia ki ban leh ia kane.
07:55 Kane kan ailad ia ki ban jied ia ka kyrteng na ka database lane table katkum ka jingkwah jong ki.
08:00 Te, sa iasnoh bad nga ha ka bynta ba bud. Khublei Shibun. Nga i Meboreen na Shillong nga dubbed na ka bynta ka Spoken Tutorial Project.

Contributors and Content Editors

Meboreen Mary