In the product list online i have the same products uner different names due to restrictions on oscommerce.

Example:
VDE004-DE
VDE004-DE1
VDE004-DE2
NLD6400-TO
NLD6400-TO1
etc.....

In the inventory list it will just have -
VDE004
NLD6400

When a product is purchased is decrements one off the stock_level column.

I need the code to say decrement 1 off the stock_level where the letters before a dash match the name in the inventory list.

So WHERE "VDE004"-DE = VDE004;

Can anyone help?

$fullProductId = explode("-", $value)
$productId = $fullProductId[0]

Should work

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.