Jump to content

Recommended Posts

Can some one please advise me with some sample code.

 

Basically I have a table in MYSQL and within this table I have a field called record_number. Obviously its an Integer and it auto increments.

 

within an HTML form with php code all I want is to display the value of this field + 1

 

So in other words if the value of record_number is 15 in the table and when the HTML form is launched the PHP code will interrogate the table get the value and some where on my form it will state the following.

 

Record Number = 16

 

Please can some one give me some real code that I could use.

 

thanks

 

Please email code to h.ghelani@rbht.nhs.uk

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/2692-get-value-of-field-in-table/
Share on other sites

hi, i think ur starting out in sumthing too deep personally, if u no anything about programming u would no how easy it is to do that.. i would suggest starting off with sumink like vbscript.. its not used much these days but its easy to get to grips with. once u understand the conecept of programmin.. things like this n javascript will b much easier.

 

anywho what u wana do is call the field from the database isnt a variable so like..

 

$record_no = $row['tables_field_name'] + 1;

 

then u display it like..

 

echo("recored number: " . $record_no . " - ");

 

if u dont no how to do the rest of the code like a database connection n query or if none of this makes any sense. id would seriously giv up on this stuff for now. go learn sumink easier like i said above. n come bk to this later when ur feeling more comfortable with programmin.

 

:D

 

hope this helps, khuti

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.