bigbenbuilders Posted September 13, 2009 Share Posted September 13, 2009 why is this only showing the name in id 1 instead of all of the ones in the name field? <?php require_once('Connections/cuaa_scholarships.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_cuaa_scholarships, $cuaa_scholarships); $query_Recordset1 = "SELECT financial.Name FROM financial"; $Recordset1 = mysql_query($query_Recordset1, $cuaa_scholarships) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_free_result($Recordset1); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php echo $row_Recordset1['Name']; ?></td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/174118-solved-only-shows-first-id/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.