Forum Moderators: coopster

Message Too Old, No Replies

Pulling out hair...

         

Bigjohn

8:12 pm on Feb 24, 2004 (gmt 0)

10+ Year Member



I'm trying to make a function:

function make_page_lable($artist) {
$sql = $sql = 'SELECT *'
. 'FROM artists'
. 'WHERE artist LIKE "%'. $artist .'%"';
$result = mysql_query($sql);
if (!$result) {
print mysql_error() . "Error - discriptor Query Failed";
}
$content="";
$row .= mysql_query($result);
$content = '<h1 align="center">' . $row['artist'] . '</h1>';
$content .= '<p align="center">'. $row['artistbio'].'</p>';
return $content;
}

I'm using LIKE because the field in the DB is likely to have upper case letters - and to use the same value throughout the page I strlower($artist).

I've tried all sorts of variations on the punctuation. I'm sure its something simple, but my newbie eyes are missing it... Please help?

John

jatar_k

2:47 am on Mar 3, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



yep
mysql_insert_id() returns the ID generated for an AUTO_INCREMENT column by the previous INSERT query using the given link_identifier. If link_identifier isn't specified, the last opened link is assumed.

Bigjohn

3:34 am on Mar 3, 2004 (gmt 0)

10+ Year Member



Dang! Imagine that, software that thinks ahead for you!

Thanks guys!

John

This 62 message thread spans 3 pages: 62