We've currently got one page index up HP and this is showing a list of all the articles in the database.
Let's add another page so that we can view a single article in more detail.
We'll start by making a copy of a duplicate of the index stuck P. H.
Page and calling it Article duckpin HP.
So for a single article instead of selecting all of them like this we want just one.
How do we select just one rijkaard.
We use the primary key that we added earlier to each record.
So here in the esky well instead of selecting all the records like this we need to add a where clause
so that we restrict the resultset to just one record.
Well hard cold in ideas in here for now just to get it working without doing anything else.
If we look at this in a browser we get one record and note we're looking at the article doppie HP page
here in the address bar.
We're only expecting one record though.
So instead of using my escudo life fetch all and then looping around the resultset in a loop we want
to get just one row.
My esky Well I fetch a sock function fetches a single roll from the resultset as an associative array
so that the indexes of the array will be the column names.
So let's change this call here to get a single article instead.
Passing in the result set up jet and changing the variable to a singular name then will have a single
array in this variable so we can remove this loop and the list elements here like that.
If there are no rows in the result set.
In other words there is no record with the idea that we supplied then this function returns no.
So let's change this if statement so that if the article variable is null we can say that the article
wasn't found like that.
So now in the browser we see the individual article.
If we change the idae in the web class to one that doesn't exist like that then in the browser we get
the article not found message as expected.