Jump to content

gettign records from db


jjmusicpro

Recommended Posts

Hello Everyone i am new to the forums:

I wanted to search my table called pasc_id, i wanted to get the last value of this field, and add 1 to it and display it, right now i have the code below, but when i run it, it displays this:

"Resource id #4" in the text box, i dont know where its pulling that from.

<input type="text" name="pascref" size="20" maxlenght="20" value="
<?php 
  $query1 = "SELECT max(pasc_id) + 1 FROM dss_returns"; 
  $result1 = @mysql_query ($query1); 
  echo $result1; 
?>
    " />
Link to comment
https://forums.phpfreaks.com/topic/26753-gettign-records-from-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.