execute row (retrieve one row)

/ Published in: PHP
Save to your folder(s)

make a query and retrieve the first record, if error occurs show it and the query.

Copy this code and paste it in your HTML
  1. function execute_row($sql) {
  2. $rs = mysql_query($sql) or die(mysql_error().$sql);
  3. if (mysql_num_rows($rs)) {
  4. $r = mysql_fetch_array($rs);
  5. return $r; }
  6. return "";
  7. }

URL: http://www.barattalo.it/

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.