Jump to content

Multiple Evaluations?


machina12

Recommended Posts

In question #1, I am wondering how to use a query that will only work if two values are correct.

(figure doing 3 or more, will just follow the same method)

So in this instance:

 

if id='345'

      and

      score>200

      then

      $query=good from here

 

Within this question, I will end up INSERTing values into another database, which will store 'id' and '$score', so in this case I am mainly focused on the "and" statement, how should tag be written to allow for multiple values to be met?

===============================================================================

 

In question #2, I am wondering how then use a query to cross-evaluate values, and only work if values meet criteria.

So in this instance:

 

If one players values meet one set of criteria, and anothers meet another, do something.

 

EX: if id='345' and score='200'

      and

      id='20' has score='150'

      $query=good from here

 

Within this question, I am wondering how to have a few fields being analyzed, and if criteris is met, and only if met, put a

value within new database as well as new id tag for this cross-evaluation....that way records can be tracked later.

BASICALLY HOW TO CODE FIRST PART CORRECTLY, ANY HELP WITH QUERY SUGGESTIONS IS APPRECIATED TOO.

So how would I insert the given evaultion's value into the seperate database...with only player id and cross-evaluation value?

EX:  columns would be:   'id'   'crossevaluationA'

 

The id would be possibly a combo of users id's, so id 001 and id 002 ineract, it places a new id 001002 and value for interection...could start with 001.

 

Proper Tags?

 

This is it in a nutshell!  Any help is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/56245-multiple-evaluations/
Share on other sites

from a logical point if your not going to gather too much info take more than you need out of the SQL and then sort it out with while, else/if and switches. Otherwise try putting some operators in your query like WHERE `id` =  $id || `score` = $score, but if you only going to return 2-3 fields and under a thousand results take more than you need and sort it out in post

Link to comment
https://forums.phpfreaks.com/topic/56245-multiple-evaluations/#findComment-277821
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.