Jump to content

shaunk

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shaunk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK, I'm a Newbie aswell but I've learn't alot over the last week and managed to get a flight logging system up an running even though it took me 10x the amount of time it would take some pro's, anyway hopefully this will help some:- While I was setting up everything I used mysqlfront program to monitor the results being entered into my database which not only allowed me to run test pages but also allowed me to see the results in a raw format along the way and test my formulas. So you can go get mysqlfront from [a href=\"http://www.mysqlfront.de/\" target=\"_blank\"]http://www.mysqlfront.de/[/a] and then you ahve a way to see the direct data while you enter it as a test. Then create a recordset (let me know if you don;t know how) which should give you a subset of the main database. At least with mysqlfront you will see your complete database directly and therefore you can figure out your query code checking the output. Best rgds Shaun
  2. Hopefully this is easy for womeone else:- I've recently set up a database that contains a numbet of fields, say for arguments sake they are field1, field2, field3 etc.... Want I want to do is make field5 equal a value of the latest value entered in field1 minus the first value entered in field1. ie: in the column field1 the first or starting entery is say 50 and as users interact with the database this value increases dependant on user input (don't worry about why) so the last value in column field1 could be say 65. I want to calculate the difference (15) and enter it into a new field. I seem to be running in to problems with a syntax or something because I've tried many combinations like the following:- <?php $firstvalue = SELECT field1 FROM databasename ORDER BY field1 ASC LIMIT 1 ; $secondvalue = SELECT field1 FROM databasename ORDER BY field1 DESC LIMIT 1 ; $valuerequired = $secondvalue - $firstvalue echo "$valuerequired" ?> Any help will be much appriciated I've run out of ideas. Thanks Shaun
×
×
  • 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.