We've had an old website move server but am having lots of problems with it, plus it's been nearly two years since I did any PHP so any help would be greatly appreciated.

Have sorted some problems out but am stumped by this one. Have stripped the code down to a simplified version/simplified query etc...

<?php
$query_PropCount = "SELECT '1' as numrows
FROM WEB_PROPOSAL" ;

$PCresult  = mysql_query($query_PropCount) or die('Error, query failed');
$PCrow     = mysql_fetch_array($PCresult);

#$numrows = $row['numrows'];
#echo $PCrow[numrows]; 
?>

If either of those red lines are included it fails. Unfortunately the new server doesn't give you a useful messge, just a 500 Internal server error. As a note, this code is embedded amongst lots of other code that all works, just this bit doesn't. Have tried various stuff like

if (mysql_num_rows($query_PropCount)>0) {

thanks in advance

Seems to have magically fixed itself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.