|
Posted by Nick on 08/15/06 18:14
On 9 Aug 2006 05:32:18 -0700, mpar612 wrote...
>
>Hi everyone,
>
>I am slowly making headway on my application. I am running into a
>strange issue now.
>
>I am inserted a "delete" link into every row returned from a database
>query using the following link:
><tr><td><a
>href=\"delete_record.php?isbn=$row[isbn]\">Delete</a></td><td>Update</td></tr>
>
>This works well and returns and opens a new window with the following
>url: http://www.mikeparkermusic.com/delete_record.php?isbn=987654321
>
>Now I am trying to retrieve the "isbn=987654321" using $_GET and I'm
>trying to make that a part of an SQL query using the following code and
>I constantly get a "DB Error:
>no such field." I could post more code if necessary, I was just trying
>to save space:
>
>$isbnget = $_GET['isbn'];
>
>print "<table align=\"center\" border=\"1\" cellpadding=\"0\"
>cellspacing=\"0\" bordercolor=\"#000000\">";
>
>$rows = $db->getAll("SELECT isbn, artist_name, album_title,
>date_format(release_date, \'%M %d, %Y\') as release_date,
>date_format(add_date, \'%M %d, %Y\') as add_date, description, price
>FROM lounge WHERE isbn=$isbnget");
> foreach ($rows as $row) {
> print "<tr><td>ISBN:</td><td>$row[isbn]</td></tr>
> <tr><td>Artist Name:</td><td>$row[artist_name]</td></tr>
> <tr><td>Album Title:</td><td>$row[album_title]</td></tr>
> <tr><td>Release Date:</td><td>$row[release_date]</td></tr>
> <tr><td>Add Date:</td><td>$row[add_date]</td></tr>
> <tr><td>Description:</td><td>$row[description]</td></tr>
> <tr><td>Price:</td><td>$row[price]</td></tr></tr>";
>
>I can post all of my code if necessary. I appreciate any help you can
>give. Thanks in advance!
>
Does your query need quotation marks around the "$isbnget" such as...
$rows = $db->getAll("SELECT isbn, artist_name, album_title,
date_format(release_date, \'%M %d, %Y\') as release_date,
date_format(add_date, \'%M %d, %Y\') as add_date, description, price
FROM lounge WHERE isbn=\'$isbnget\'");
Nick
--
Newsguy - Basic Account - $39.95 / year
http://newsguy.com/overview.htm
[Back to original message]
|