0

I m doing a project in which i have to delete some data by matching 2 different fields. i m using and operator but it is not working in php page but it is working properly in phpmyadmin. So, please provide me some solutions about integration to php page with my-sql.

<?php
$q1= "delete from table3 where item_id='$a' AND vou_no='$a'";
?>
5
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by vaultdweller123
0

Your query is fine. There might be something wrong with your PHP code. Check it, or post it here for help.

0

I m doing a project in which i have to delete some data by matching 2 different fields. i m using and operator but it is not working in php page but it is working properly in phpmyadmin. So, please provide me some solutions about integration to php page with my-sql.

<?php
$q1= "delete from table3 where item_id='$a' AND vou_no='$a'";
?>

check if those variables, $a & $b are getting values

0

If you are checking two different values, shouldn't they both be in the sql ? Currently both fields are referring to $a.

0

yeah i agree with network18, check for the values of $a and $b... the fact that it work fine in phpmyadmin means your query is fine and should satisfy the query statement... if you had the correct values of $a and $b the query will return true.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.