I had saved the required steps for a parameterized string match query that outputs the subsequent rows. I had lost my files when transferring to a faulty drive. So... I'm trying to mash things together and this isn't working.
$stmt = $link->prepare("SELECT id,entry,date from table WHERE string=? ORDER by Id DESC");
$stmt->bind_param('s',$string);
$stmt->execute();
$stmt->bind_result($id_db,$entry_db,$date_db);
if (($result = $link->query($stmt)) {
while ($row = $result->fetch_row()){
}
}
I can already tell that this is wrong, I don't use the parameterized results and I'm trying to use array indexes such as $row[0].
Going to get yelled at for this one I know.
The end result I want is for example:
string1 has rows: bob, mack, chris string2 has rows: alice, claire, lara
If $string=string1 then the output should be:
chris mack bob
I believe my problem is I am mixing statement types
Assuming that "$link" is an instance of PHP's "mysqli" class, and that "id" and "Id" are two diffrent columns in your table (if it's not the case, please try replacing "Id" with "id" in the segment ".. ORDER BY Id.."), here is, based on your example, what I suggest that you try: