MySQL Forums
Forum List  »  PHP

Return values from a select
Posted by: Michael Smith
Date: August 04, 2018 03:13PM

I am trying to return values from a table for use in another table.

I am using a primary key, so there is just one row that matches.

I am using code as below which doesn't work.

$sql = "SELECT lotno FROM customer1 WHERE lotno = '400' " ;

$FirstName = $row["fname"];
$Lastname = $row["lname"];

echo "First Name" . $FirstName;
echo "Last Name" . $LastName;

I need the code for returning the FirstName and LastName from the select statement.


Options: ReplyQuote

Written By
Return values from a select
August 04, 2018 03:13PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.