Hello, This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 20:40, lines prefixed by '>' were originally written by you. > I have the following chunk of code: > $sql = "SELECT setting from settings where name='display_rows'"; > include("connect.inc.php"); > print $sql; > $row = mysql_fetch_row($result); > $path = $row[0]; > print $path; > It always prints out "1" > But if I run the code at the sql command prompt, it prints out "25", > which is the correct value. > Does anyone have any ideas why im having this problem?? > - ---
Unless it is done within connect.inc.php you have not executed your query. Maybe the last query you executed has a row containing the value 1 ready to be fetched? Try adding $queryid = mysql_query($sql); before $row = mysql_fetch_row($result); David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php