Jump to content

RonnieCosta50

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by RonnieCosta50

  1. I want to count how many rows there are with the values 127 and 555:555 in certain columns. In the table I am using, there are 2 rows with that criteria. I'm having trouble with the IF statement I think. Anyone know what's wrong? I've been trying for 3 hours. What I want it to do is tell me if there is a row or now. That's all. <?php $query = mysql_query("SELECT COUNT(*) FROM $table WHERE $column3 = '127' AND $column5 = '555:555'"); // Selects 2 rows from the database table. $numRows = mysql_num_rows($query); if ($numRows>0) { echo"Row exists!"; } else { echo"Row does not exist"; } echo"</br>TEST COMPLETE"; echo"Total Rows: $numRows"; ?>
  2. Thank you so much. I've been trying to figure this out for over 3 hours. It's always syntax errors with me.
  3. <?php $noError = 0; echo"Test 1 Passed</br>"; ?> <?php include 'f2.php';?> <?php echo"Test 2 Passed</br>"; if($noError = 0) { echo"Test 3 Passed"; } ?>
×
×
  • 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.