pclfw 23 Junior Poster
pclfw 23 Junior Poster

This sounds like a very ambitious project for someone who doesn't understand the complexities of the question they've asked.

You might wish to google 'Data Normalisation', followed by 'data optimisation'.

When you understand those two fields you might wish to reframe your question. Or you might wish to buy in a contractor who understands all of these things and will do it for you. They usually turn out cheaper than a screwed up DB in the end.

pclfw 23 Junior Poster

The code that you're using should work,

<?php // code to get final grades
//$sqlquery2 = "SELECT max($Totalmark) $fname, $surname FROM details";
//$results2 = mysql_query($sqlquery2);

If you inserted the missing comma between max($Totalmark) and $fname.
Might be worth a try.

pclfw 23 Junior Poster

I've heard that JpGraph is good and easy to work with.

pclfw 23 Junior Poster

None of these 'solutions' get over the fact that you are deleting records from an invoice table. In the UK this would be considered unauditable and you would be unable to get these deletions past SOX or JSOX compliance.

Deleting records in your accounting trail is, at least unwise; certainally stupid and probably a criminal act.

sknake commented: well said +6
pclfw 23 Junior Poster

It would probably be better, especially for audit trails etc, to leave the current IDENTITY column intact and add another column to show if the row is active or deleted.

Then your users can make their current allocation of errors and just tag the record as deleted. The VAT / TAX man will be happy because your invoice table won't have gaps in it. And your accountants / auditors will also be happy that they can see all of the errors your data entry people make.

sknake commented: lol +6
pclfw 23 Junior Poster

have you done a mysql_connect()?

pclfw 23 Junior Poster

PHP will allow you to format the display of data in any format that you can think of.

Remember that you are taking data out of an array and placing it into holders, usually columnar but they can be a horizontal series
[d1 d2, d3 d4 d5 d6 d7 d8 d9]
just as easily.
Or a set of columns in a set of rows
[d1 d2 d3
d4 d5 d6
d7 d8 d9]

Using CSS they could be wandering independantly around the screen, or following the mouse. The actual placement is limited only by your imagination.

pclfw 23 Junior Poster

Well now my go.

I have done something very very similar.

No you cannot have the code. It is MUCH MORE FUN it you work it out for your self.

For a start something that the previous posters forgot, what happens if more than one matching row is found (i.e. only the 'Sex' field was filled in?

The previous examples show HTML forms being used. I would suggest that you look at text boxes and handle the input / display using javascript and good old (new?) AJAX. Remember fields do not have to exist when the page is first displayed on the client screen. the DOM allows you to create objects, and set their values and all other properties on the fly.

QUICK TIP use different text areas for user input and data display, when the user submits some data expect it to be partial data and leave the focus in the same fiedl that the user last used. If the user submits "Pat" and you list out all of the Pat's / Patricia's & Partick's that you can find, the user will find it much easier to go on to finish Patraig.

I would recommend you get 'THE JAVASCRIPT BIBLE'. It contains a huge amount of information and will guide you through your first steps in implementing this type of function.

pclfw 23 Junior Poster

I have used this style of table reuse before and always handled the releationships in the application.

As you say if you try to set foreign key relationships from either the COMPANY or CONTACT table you will always get a key constraint violation when entering a record into either of these tables.

However your appluication can handle the relationship constraints as well as the address 'type' rules (i.e. can a Contact have a SHIPPING address? maybe yes; maybe no.)

pclfw 23 Junior Poster

tuukie,
The syntax for the update statement is incorrect. Have a look in BOL to find the correct statement syntax.
You have the right idea with the [DB_Name].[dbo].table_name. I have used this technique a number of times.

pclfw 23 Junior Poster

RFID tags sound great until you have a look at their weak points.

Current tags, 1sqm in size are great, get a metalic plastic bag and they sit inside waiting to be activated as you walk through the detectors. Has happened here in the UK.

Future tags well think of the research that has gone into electronic counter measures and you will see the problems of trying to use these tags against a technically aware population. False numbers, you don't like the ID number your coat is sending out? change it to another. Make the 'THEM' wonder why you're wearing a blender in the rain. Signal blocking, prevent the tag receiving the querying signal or sending its answer. suddenly you're clothes are invisible. This might lead to charges of indecent exposure, but I'd like to see the witnesses argueing in court. There are so many techniques for defeating these things that I don't know where to start.

I don't thnk that RFID tags are anything to worry about just yet.