|
Re: MySQL Problem
Try using:
PHP Code:
$result = mysql_query("SELECT * FROM contacts",$link) or die ("Mysql error: ".mysql_error());
Also, all that mysql_result stuff is probably overkill thanks to mysql_fetch_array.
PHP Code:
while ($array = mysql_fetch_array($result,MYSQL_ASSOC)) {
print "$array['row'] $array['otherrow'] $array['etc']";
}
That makes it a whole lot cleaner and I'd assume quicker (but I'm not positive). (Also, take a look at www.php.net/mysql_fetch_array to see what that MYSQL_ASSOC is about, if you're wondering. You don't really need it, I guess, but I always use it)
__________________
I'm a professional web developer. I'm good with PHP, Perl, Java/JSP, some RoR, XML, Javascript (AJAX as well), (x)HTML, CSS, etc.. Validated code is good; fully cross-browser code is better (you comply to your users and the software they use, not the other way around. Sorry!)
|