Query Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Query Question

Post by John Cartwright »

Code: Select all

<?php
$result = @mysql_query("SELECT * FROM records_total ORDER BY `date` DESC");
?>
How would I only display the ones with the variable $league==cal in each row...


So it would look like

Variable 1----Variable 2------League
blah----------blah-------------cal
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

$result = mysql_query("SELECT * FROM records_total WHERE league='$league' ORDER BY date DESC") oe die(mysql_error());
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

ty
Post Reply