Jump to content

[SOLVED] Remove Entry


cheechm

Recommended Posts

Hi,

I have this code:

                        $item = split(', ', $row['items']);
                        foreach ($item as $value) {
                            $sqli = "SELECT name FROM hire WHERE id = " . $value . "";
                            $resulti = db_query($sqli) or die("MySQL ERROR: " . mysql_error());
                            while ($rowi = db_fetch_array($resulti)) {

                                echo $rowi['name'];
                            }

                        }

 

Lets say I get for $value: 2, 2, 3, 4

You can see there is two "2"s. How do I remove one of them?

So the MySQL query only checks, 2, 3, 4?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/119556-solved-remove-entry/
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.