Jump to content

dr_overload

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dr_overload's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I currently use this script to retrieve data from the one table <?php mysql_connect("**", "**", "**") or die(mysql_error()); mysql_select_db("**") or die(mysql_error()); $data = mysql_query("SELECT * FROM world_cup WHERE username ='$username'") or die(mysql_error()); while($info = mysql_fetch_array( $data )) if ( $info['a'].$info['b'] == $info['c'].$info['d'] ) { echo $info['e']; ?> What would I have to change in the script if 'a' and 'b' were in a second table. ie world_cup_scores? Any help is most appreciated
  2. [!--quoteo(post=377678:date=May 27 2006, 06:10 PM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ May 27 2006, 06:10 PM) [snapback]377678[/snapback][/div][div class=\'quotemain\'][!--quotec--] Are you limiting your sql query to specific records, or are you checking every record? [/quote] I have a login script and it will take the entry from the row of the inputted username
  3. I'm a newbie and have tried to work out a script but just simply cant manage it. Any chance someone can help me? Basically all I want to do is have a script that compares the values of two mysql fields, if the are the same, print the value of the third field, else print the value of fourth field. I got the it working from without connecting to the database and giving the values in the script ie <?php $a=2; $b=2; $c=5; $d=0; if ( $a == $b ) { echo "$c"; } else { echo "$d"; } ?> But when i try to replace the values with what is in the database it doesnt work - I guess my script for comparing the mysql field values is not working properly. Any help would be most appreciate. Cheers
×
×
  • 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.