Pulling data and printing it in an HTML table

前端 未结 3 2092
一向
一向 2020-12-22 08:17

From a MySQL table called \"submission\" containing the fields \"loginid, submissionid, title, url, datesubmitted, displayurl\", I would like to print an HTML table thats co

3条回答
  •  天命终不由人
    2020-12-22 09:03

    One problem I can see is you are not checking in the return value of mysql_query()

    mysql_query() returns false if it fails to execute the query. So you need to do a check, something like:

    $result = mysql_query($sqlStr);
    if(! $result) {
    
      //....error occured...prepare $message
      die($message);
    }
    

提交回复
热议问题