lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · relation from album to artist...
TRANSCRIPT
![Page 1: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/1.jpg)
Lecture 20A Fuller Example:
PHP PDO SQLite CSV Bootstrap
*
* Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
![Page 2: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/2.jpg)
3/22/17 Slide 2
Outward Appearance
3/22/17 Slide 2CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 3: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/3.jpg)
3/22/17 Slide 33/22/17 Slide 3CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
CreateRevisitedWhole page body fits on one screen.
Use PHP as a programming language.
And don’t try to read each line, just notice structure.
![Page 4: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/4.jpg)
3/22/17 Slide 43/22/17 Slide 4CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
SQL Command laid out in readable format.
Relation from album to artist through FOREIGN KEY
Important detail, notice ‘global’ declaration.
![Page 5: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/5.jpg)
3/22/17 Slide 5
‘prepare’ for repetition
3/22/17 Slide 5CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 6: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/6.jpg)
3/22/17 Slide 6
Think Carefully about Logic
3/22/17 Slide 6CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 7: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/7.jpg)
3/22/17 Slide 7
Execute Prepared Stmt.
3/22/17 Slide 7CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
Single element array
Key-value pairs array
![Page 8: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/8.jpg)
3/22/17 Slide 8
Query and Display
3/22/17 Slide 8CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
Tabs alter order.
Pagination.
![Page 9: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/9.jpg)
A Building Block
ØTrack and highlight a selection.
3/22/17 Slide 9CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
From W3Schools, recall..
![Page 10: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/10.jpg)
3/22/17 Slide 10
Maintain State Information
3/22/17 Slide 10CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
Think through what this particular HTML anchor is actually doing!
![Page 11: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/11.jpg)
3/22/17 Slide 11
Pagination Outward
3/22/17 Slide 11CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
Study and experiment on your own time, a bit more than a simple in-lecture example.
![Page 12: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/12.jpg)
Pagination Inwards: SQLØPay particular attention to the query
string construction.
3/22/17 Slide 12CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 13: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/13.jpg)
3/22/17 Slide 13
Search for Music
3/22/17 Slide 13CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 14: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/14.jpg)
3/22/17 Slide 14
Search Internals: Form
3/22/17 Slide 14CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
![Page 15: Lecture 20 - cs.colostate.educt310/yr2017sp/more_progress/... · Relation from album to artist through FOREIGN KEY Important detail, notice ‘global’ declaration. 3/22/17 Slide](https://reader035.vdocuments.site/reader035/viewer/2022063008/5fbc5acafed1155f3757bf83/html5/thumbnails/15.jpg)
3/22/17 Slide 15
Search Internals: Query
3/22/17 Slide 15CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz
Pay particular attention to the query string construction.