Need Help with a query


Posted on 16th Feb 2014 07:03 pm by admin

Hello,
For some reason I am just not getting the right answer when I do this query and not quite sure why?
$runinposition = mysql_query("SELECT * FROM bb_off WHERE user='$user' AND test1='test1' OR test2='test' OR test3='test3' OR test4='test4' OR test5='test5' OR test6='test6' AND Result1='result1'OR Result2='result2' OR Result3='result3'OR Result4='result4'");
$runinpositionresult= mysql_num_rows($runinposition);
Did you know?Explore Trending and Topic pages for more stories like this.

So, basically what I am trying to do is count how many test there are when the user = the user and one of the results???
No comments posted yet

Your Answer:

Login to answer
172 Like 42 Dislike
Previous forums Next forums
Other forums

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

Why use OOP?
Can someone explain to me why I should use OOP instead of procedure based code.

Im building a

chat
hello i'm amir i need a chat source code in asp.net 2.0 without Ajax. anybody can help me?

Changing color in GD via variable?
Hey guys, I'm new here. x)

I'm very much a noob when it comes to PHP, but I'm trying to learn

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash