View data by clicking a link from the Mongo database

Asked

Viewed 82 times

1

Guys, I have the following situation! I have a list of entries saved in my Mongo bank, I need to display the list thing I’ve already done and when clicking on the product would open a screen with more details about that product, I’m new in Mongo and I’m taking a beating. In mysql I would just use a get pick up id and ready but could not do in Mongo. Unfortunately I can’t change the bank I don’t have authorization so I need to find the solution. I’m using PHP with Mongo.

For example I have the list,

Paper Rubber Pen

When you click on Paper you need to open a screen displaying all the details of the paper material that is registered in the bank as color, size etc. Inside the paper screen you will have a button called request. When pressing this button opens a small form to be filled with the name and date fields, then when you click submit I need to associate this person’s name to the item she requested in the paper case.

Note: I already have the form I am already listing the content, the only thing I need help is in the process of clicking on the paper and displaying the details, and at the time of submitting the form, relate the name of that person to the requested item.

This is what I am using to display the list and when I click on them I am taken to the page Description.php most obviously appear all products with their respective descriptions since I have not specified anything to individualize them. There’s my first problem.

$rows = $mongo->executeQuery("empresa.produtos", $query);    
    foreach ($rows as $row) {
    echo "<a href=\"description.php\">$row->items<br>";

1 answer

0

Updating, I used a $id = $_GET['id']; common as if I were working with Mysql. When the person clicks bringing the item id correctly it no longer brings the other information. I just need to bring the other fields.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.