-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscrap.txt
More file actions
14 lines (13 loc) · 760 Bytes
/
Copy pathscrap.txt
File metadata and controls
14 lines (13 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<ul>
<li v-for='city in cities' :key='city.id' @click='myFunction(city.name)'>{{ city.name }}, {{ city.country }}</li>
<!-- the ":key" property tells vue to optimise its rendering -->
<!-- it will prevent Vue rendering until it is ready to show accurate data -->
<!-- key must be passed a unique value. The colon BINDS the key to the data object -->
<!-- @click is the Vue way of doing event listeners -->
<!-- It looks in methods for the function -->
</ul>
`SELECT username, comment, (
SELECT * FROM COMMENTS
WHERE id = $1) as "originalComment" FROM replies
WHERE comment_id = $1
ORDER BY id DESC;`