Jump to content

Farmgirl

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://blog.torquereaction.co.uk

Profile Information

  • Gender
    Female
  • Location
    Lancashire, England, UK

Farmgirl's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well I think I've FIXED the problems...at least I HOPE I have!
  2. QFT. What has Quantum Field Theory (QFT) got to do with this discussion? Or is this 'senior' missing something?
  3. I think the problem is that you, like many of us, forget how stupid you must have sounded in the early days of learning anything to do with computers and programming. When you stated asking questions about topics which were new to you. We are all stupid and ignorant, when it comes to asking questions about something we don't know. Until one knows the language (jargon) one does not need to say much to sound stupid. What I find equally as off putting, is the arrogance of some, so called 'helpers', who assume that because you can't express yourself in 'their' language, you are treated like a leaper, to be avoided at all costs, or worse still, to be talked down to as though you are a child and admonished for whatever you have done wrong in their eyes, making you feel less inclined to ask any more questions, be they genuine, even if they are incomprehensible or otherwise.
  4. I wouldn't do it that way...since you could run into problems as in your data you may have more than one product called 'new1'. In relational databases, which MySQL is, you need to use the primary KEY which is UNIQUE and is usually in the first column of your table. So in your case it would be the 'incr' value 1, 2, 3, ... So depending on which 'gen code' for whichever product called 'new1' you want to SELECT from your database you use the Primary KEY for that row...so code would be something like... $sql="SELECT info.gen FROM info WHERE info.incr = 2";
  5. I don't think the JOIN would work in this case since the idea was for the PRODUCT to have MANY codes. At the moment the PRODUCT has only ONE generated code attached to it. Surely the GEN column needs to be dropped from the PRODUCT table and a another table made which contains ProductID and Gen_ID, that way they would marry up when being called in a query. This new table would be in addition to the GENCODE-Table...called something like PROD_GEN. Just my thoughts...but then I am learning too.
  6. Thank for that! I'll try it out. Cheers
  7. Thanks for your input Neil, but how do I 'sanitize' the input? It's not an area I am familiar with. If you could point me in the right direction, I would be most grateful.
  8. Hi, the reason you are getting the wrong info sent back to you via the form is because you have not declared a numerical 'value'. The value at the moment says 'checkbox' it should really be the number '1' as checkboxes are based on simple logic (boolean) that's to say they are either checked (YES) or not (NO) where (YES = 1) and (NO = 0) Since only the 'value' of the checkboxes selected are sent back in the form. You don't need any PHP in this form, all you need do is make sure you have a php page named send_form_email.php which is the page you have declared as the action part of the form! There is a good tutorial HERE if you are not sure how to go about writing a PHP page to manipulate the form data. Mary
  9. I did ask a question, see above quote, but it was not that visible, or perhaps lost in my blurb! This is the code I have at present... where 'trackid' is passed via the URL when the user selects the name of the tractor displayed after the initial search result is displayed. <?php if(isset($_GET['trackid'])){ $TrackID=$_GET['trackid']; //connect to the database $db=mysql_connect ("localhost","user","password") or die ('I cannot connect to the database because: ' . mysql_error()); //-select the database to use $mydb=mysql_select_db("tractors"); //-query the database table $sql="SELECT tractor.tractor_name,class.class_name,weight.w8 FROM `tractorw8`,`tractor`,`class`,`weight` WHERE tractor.tractor_id = tractorw8.tractor_id AND weight.w8_id = tractorw8.w8_id AND tractor.class_id = class.class_id AND tractor.tractor_id = " . $TrackID; //-run the query against the mysql query function $result=mysql_query($sql); //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $Tractor=$row['tractor_name']; $Class=$row['class_name']; $W8=$row['w8']; //-display the result of the array echo "<ul>\n"; echo "<li>" . $Tractor . "</li>\n"; echo "<li>" . $W8 . " " . $Class . "</li>\n"; echo "</ul>"; } } ?> I want to display $Tractor on its own, with a list containing all the differant instances of its corresponding $W8 $class which would display a list similar to this... Starlight Express 1 3.5t Modified 4.5t Modified 5.5t Modified Having just written out this reply, I've suddenly seen a possible solution. If it works I'll be back...in the mean time I'll go Thanks
  10. I'm struggling with the right code to get the answer I want from a small 7 table database using PHP and MySQL. I'm pretty much a beginner when it comes to PHP & MySQL...having only started this about three weeks ago. The main PHP code for the page works OK, but it's just one small element I want to refine. The page I made has a search facility which works at two different levels. I got the code from a tutorial I found HERE, and adapted it to fit my database model. Here's my page... Tractor Pulling Database In one of the search results it lists tractor name (tractor.tractor_name) weight class (weight.w8) (class.class_name) Because each tractor can vary its pulling power by adding another engine, (some tractor pullers in the USA NTPA have up to seven engines fitted to their tractors! in the UK we are a little more reserved and tend to have about four), I want to be able to list the name of the tractor, perhaps like a heading, with the various weights/classes in a list under the tractor name. At the moment the list consists of the tractor name with the weight class underneath, and repeats for each change of weight added, like so... tractor name (tractor.tractor_name) weight class (weight.w8) (class.class_name) tractor name (tractor.tractor_name) weight class (weight.w8) (class.class_name) ... ... Thanks...
  11. I like it very much and, in my humble opinion, suits the type of company it is made for. I love the picture of the Great Wave...lovely Japanese painting by an old master...fits the page well! Nice choice. PS: I found this in Wikipedia...http://en.wikipedia.org/wiki/Hokusai it's about the artist.
  12. A note about the CSS, I know it's a project and that you are more concerned with the php aspect, but if you are going to use CSS then at least do take care with the use of ID when you should be using CLASS. The link to the 100 list is not displaying as it should, this I think is more a problem with the CSS above. Each of the top ten div tags use the same ID. This is not correct CSS markup, it would be better to make the ID into a CLASS in your style sheet and in your html page. The PHP seems to be working ok...but then I too am new to PHP so I can't comment too much! LOL
  13. I've just finished a little project which I started in order to help me understand PHP & MySQL better. It's been a steep learning curve, but I feel now that I have grasped the basics. So with this in mind, please feel free to comment on my efforts. T.P.Org.Uk - Tractor Pulling Database
×
×
  • 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.