Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.