Jump to content

[SOLVED] Help...


dennismonsewicz

Recommended Posts

I have this bit of code:

 

$result = mysql_query("SELECT * FROM tbl_name WHERE project LIKE '%" . $project_name . "%'") or die(mysql_error());
$rows = mysql_num_rows($result);

if ($rows > 0) {
     echo '<p>Here is a list of other projects that have similar Project Names:</p>';
        while ($name = mysql_fetch_object($result)) {
		echo '<p><a href="tools.php?action=view&id=' . $name->id . '">' . $name->project . '</a></p>';
	}
}

 

The above code is supposed to search through the DB when a new project is added and then spit out all project names that have the same or are like the same project that was added... well it is only spitting out the one you just inserted :(

 

Anyone got any ideas?

Link to comment
https://forums.phpfreaks.com/topic/126314-solved-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.