jjmusicpro Posted November 9, 2006 Share Posted November 9, 2006 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 More sharing options...
Caesar Posted November 9, 2006 Share Posted November 9, 2006 [code]<?php $query = mysql_query("SELECT max(pasc_id) + 1 FROM dss_returns"); $result = mysql_fetch_array($query); echo"$result[pasc_id]";?> [/code] Link to comment https://forums.phpfreaks.com/topic/26753-gettign-records-from-db/#findComment-122339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.