Jump to content

chiprivers

Members
  • Posts

    468
  • Joined

  • Last visited

    Never

Everything posted by chiprivers

  1. It would be easier if you could swap the value of the primary key field but I don't think you can do that.
  2. I think what your asking to do is swap the position two records are stored in the actual database, what you will have to do is extract the values of each field from both the records and then update each record with the other records values, excluding the primary key field.  This will then have the effect of swapping them around, I think!
  3. Do you mean when displaying your results or literally the order in which the records are stored in the database?
  4. Can anyone help me with how to display the special charachter that represents infinity (two circles joined next to each other)? I guess it will be something like: &blahblah; ???
  5. CAn anyone help me with how to display the special charachter that represents infinity that looks like two circles joined next to each other?
  6. I did try and use the date and datetime column types in MySQL on a previous project but I didn't get along with them very well because the default format is not UK standard.  I couldn't find a simple way around that which is why I switched to using timestamp, for that project the restrictions did not pose a problem.
  7. Would there be any advantage of changing my dates to this storage type? I have already stored a lot of info in my database and so unless there is any notable advantage, I will probably keep as is. Many thanks on the help with the select statement, it is working perfectly. ;D
  8. I'll give that query a try and post my results.  I was going to use one column for the date to hold a date stamp but that would not allow dates prior to 1970.  Obviously, working on a family tree, there are going to be a large number of dates prior to 1970.  DO you have any other suggestions for the date?  I know my solution means having three columns but it seems straight forward enough without any causing any problems.
  9. To redirect to alternative page: <?php /** * Place in a blank PHP page */ // Change to the URL you want to redirect to $URL="http://www.example.com"; header ("Location: $URL"); ?>
  10. you will want something like this to get value of custorsup: while ($row = mysql_fetch_array($result)) { $value = $row['custorsupp']; } This will apply the value with c or s to the variable $value.  What the above is doing is actually looping thorugh all records returned and doing this for each record but as there should be only one record returned it should do it just the once.
  11. Might be a stupied question but have you declared the variable $iQuery and if so is it valid?
  12. Hi Alex, Have you done any PHP and MySQL integration?  If not, you should start with a simple tutorial like this one: [url=http://devzone.zend.com/node/view/id/641]http://devzone.zend.com/node/view/id/641[/url] I am assuming that you first want to verify a persons username and password, you can do this by querying the database for records where the username and password columns values match those entered by the user.  If you have this set up correctly and the person enteres valid details, this should return one record from the database.  You can then extract the value from the custorsupp column of this one record to use in proceeding.
  13. I have a database containing information I have collated with reference to my family tree.  The database includes the tables below: individuals -  individual_ID, surname_birth, first_names_birth, sex  (contains basic details for each person) births - individual, date_day, date_month, date_year (contains details of birth and connects to individuals using individual_ID = individual) links - link_from, link_to, link (records connections between people where link_from and link_to are the individual_ID's of the people and link is the relationship between the two individuals) link_types - link, link_group (this puts the link entries into categories where links.link = link_types.link and then the link_group would be one of either "Parent", "Sibling", "Spouse" or "Child") What I am struggling to do is extract the name and birth details of any individual that shares a common link_group and is related to a selected individual, and then sort the results in order of birth date. I am thinking along the lines of: SELECT surname_birth, first_names_birth, sex, date_day, date_month, date_year, link FROM individuals, births, links, link_types WHERE individuals.individual_ID = births.individual AND individuals.individual_ID = links.link_to AND links.link_from = [slected person] AND links.link = link_types.link AND link_types.link_group = [selected group] ORDER BY births.date_year, births.date_month, births. date_day ASC Any help would be very much appreciated, many thanks.
  14. When I first learnt HTML (self taught) I would use the <font></font> tags with styling properties to alter the appearance of text in the middle of a block of text.  A little while ago, I recall reading that the <font> tag was redundant and I think it said I should be using the <label> tag in its replacement. Now, whilst trying to learn a bit more about CSS I have read that the <span> tag may be the correct thing to use in this situation.  I appreciate that all of these options will do the same thing, but I would like to try and keep my coding to a recommended standard, please could anybody advise the correct tag to use, it may be a different one altogether.
  15. Maybe if I explain further what I am trying to do, you might be able to suggest an alternative.  I am building a script to store and display the results of my research into my family history.  On one of the display pages I want to list events that have occurred for an individual, ie their birth, marriage, death etc. I was thinking that I would have a table that stores basic name details for individuals, a table that stores basic life event details and then tables for each type of life event and their relevent details. I was then planning to query the basic life event table to find records for the selected individual, then loop through the results and for each life event, query the relevant table to find the information related to that event. Is this too much querying throughout the script and in loops?  Is there an alternative without creating a table that has a lot of irrelevant fields for each record?
  16. Is it good practice to place database query statements within a loop, this resulting in many queries within a script just to pull one record at a time?  This may seem like a strange question but I am working on quite a complex script that I am trying to structure my database for and the simplest way to structure the data is in several different tables.  This resulting in the possibility of querying data from a different table on each occurence in a loop depending on other input factors. Is this the norm or should it be avoided?
  17. I am writing a script to store my family tree information and have come across a problem for storing dates.  I am using time stamps to store dates but cannot use this to enter a date prior to 1st Jan 1970.  I thought I would be able to use negative value time stamps to go earlier but this does not work.  Is there an easy way around this or can anybody suggest an alternative method of storing dates that does not have a limit on dates that can be used?
  18. I am reasonbley new to PHP and am only just getting to grips with the OOP approach. I have just started learning this because I want to get my PHP script to interact with MS Word and create documents on the fly. I have mastered a couple of basic commands to create a new word doc, enter some text and save it. I am now trying to create a table within the document but can not find the right syntax. Nor can I find any resource on the web that details the interaction of PHP and MS Word. Can anybody help me please??
×
×
  • 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.