JJohnsenDK Posted January 3, 2007 Share Posted January 3, 2007 HeyAs the subject says; how do i set something equal to the biggest number in a colum database.i have this database:Seasons:seasons_ID: 1 - year: 2006seasons_ID: 2 - year: 2005seasons_ID: 3 - year: 2007seasons_ID: 4 - year: 2004in a mysql_query how do i put year equal to the biggest number in year?[i]$sql = "SELECT year FROM seasons WHERE year = what code here?";[/i] Link to comment https://forums.phpfreaks.com/topic/32771-solved-to-how-set-something-equal-to-the-biggest-number-in-a-colum-database/ Share on other sites More sharing options...
Caesar Posted January 3, 2007 Share Posted January 3, 2007 Do you mean something like...[code]<?php$db->query("SELECT max(year) FROM seasons");?>[/code] Link to comment https://forums.phpfreaks.com/topic/32771-solved-to-how-set-something-equal-to-the-biggest-number-in-a-colum-database/#findComment-152566 Share on other sites More sharing options...
JJohnsenDK Posted January 3, 2007 Author Share Posted January 3, 2007 i did ;D thanks alot champ :) Link to comment https://forums.phpfreaks.com/topic/32771-solved-to-how-set-something-equal-to-the-biggest-number-in-a-colum-database/#findComment-152569 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.