Jump to content

Archived

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

eranwein

mysql problem

Recommended Posts

i have two tables: tblItem and tblItemColor.

i want to delete some records from the tblItemByColor table.

this is the query i'm trying:

DELETE FROM mydb.tblItemByColor
WHERE item_number = 10
AND (color_number = 6 OR color_number = 9)

no rows are effected by running it, although there are records with those properties.

Share this post


Link to post
Share on other sites
try it like this[code]
DELETE FROM tblItemByColor
WHERE item_number = 10
AND (color_number = 6 OR color_number = 9)[/code]
you dont need to call your db (mydb.) it is already being called from your mysql_connect page

Share this post


Link to post
Share on other sites
i have in my project something like 300 querys. all built with "mydb.", so i'm guessing this is not the reason...

btw, whenever i forgot to call "mydb." it failed to run.

Share this post


Link to post
Share on other sites
do you have it in a query[code]
mysql_query("DELETE FROM mydb.tblItemByColor
WHERE item_number = 10
AND (color_number = 6 OR color_number = 9))or die(mysql_error());[/code]
if so add the [or die(mysql_error())] that should tell you the problem

Share this post


Link to post
Share on other sites

×

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.