Parse & JS: Basic Query

This entry is part 14 of 25 in the series Parse & Javascript

Say we have these data in the table and we have like to find out the movie that was released in the year 2013.

The general pattern is to create a Parse.Query, put conditions on it, and then retrieve an Array of matching Parse.Objects using find.

For example, to retrieve of the title of the movie with a particular releaseYear, use the equalTo method to constrain the value for a key.


<!doctype html>
    <title>My Parse App</title>
    <script type='text/javascript' src=''></script>
    <script type='text/javascript' src=''></script>


    <div style='display:none' class='error'>
        <h1>Movie not found</h1>

    <div style='display:none' class='success'>
        <h1>Movie Found</h1>

    Parse.initialize('5d3sro43zBGj8AMYqWND5bFYMzAan7f5P5euZm7M', 'hlRZZqAylA7Fmah4Kk6ma8WK7QCT4cHrxjafnnkI');
    var MovieObj = Parse.Object.extend('MovieObj');
    var movieObj = new MovieObj();

    var query = new Parse.Query(MovieObj);

    query.equalTo('releaseYear', 2013);

                success: function(movieObj) {
                    var title = movieObj[0].get('titleName');


Try The Code

The array name of the matching Parse.Object is movieObj and we use movieObj[0].get to retrieve the title of the movie.

MySQL Clients: Query DB

This entry is part 4 of 8 in the series MySQL Clients

Let’s make a simple query through Toad.

select * from artist

From the menu, go to Tool -> Editor.

Type in the above query and execute the sql.


Let’s end this tutorial by dropping the table and the database.  In our next tutorial, we will create again the database and table using PHP.

Execute the below 2 sql scripts to remove the table and the database.

drop table artist
drop database allartist

You can verify if you have removed the database successfully by login in using PHPMyAdmin.

SQL: More Select Examples

This entry is part 9 of 20 in the series SQL Tutorial

Using the same table, let’s try more select statements.

If you work in the IT industry, and there are databases in your applications, being proficient with querying the database could become crucial to your daily work.

create table artiste
 id int auto_increment primary key, 
 artiste varchar(30), 
 album varchar(50),
 year int(10)

insert into artiste
(artiste, album, year)
('Rod Stewart', 'Maggie May', 1973),
('New Order', 'Substance', 1987),
('Nirvana', 'Smell Like Teen Spirit', 1992),
('Rod Stewart', 'Out of Order', 1988);
1Rod StewartMaggie May1973
2New OrderSubstance1987
3NirvanaSmell Like Teen Spirit1992
4Rod StewartOut of Order1988