Jump to content
Larry Ullman's Book Forums

BHB

Members
  • Content Count

    49
  • Joined

  • Last visited

Everything posted by BHB

  1. Thanks! I was leaning that direction. This is just for home server convenience.
  2. Avatar is a carriage horse. So I am behind but up high enough to see across his back. I am a horseman and artist. Have not been programming for long. I will study this. Maybe my problem has been in presenting a correctly formatted array. Array must be two dimensional, correct? Using SPL to get file name and file size. Just my first time using these functions. I have stuck to procedural code to date though i have been reading oop. Knowing it is possible helps a lot!!! Thank you. I will post some code if I get super stuck.
  3. I am writing a little script to read files in a folder (photos) returning an array of file name and file size. Can mysqli handle a prepared statement inserting an array? Would be nice to insert 500 photo names at once rather than typing them all in. Ps.. Not for a public site, just a script i run on a home server to build a site. Tx
  4. Can you have all data in one domain and own say 30 domains that relate then feed each domain different subset of data to build complete different sites? I assume yes. Suggest a book??
  5. Well thank you, I understand. I would like to further understand this books chapter. Maybe then i will better understand your method. Anyone willing to attempt helping me on the books method??
  6. Good gracious! This is way over my head. I am in kindergarten code I guess. I don't see me writing this amount of code to produce pedigrees,.. The depth of these queries is unbelievable! I am just starting with stored procedures. This method is a bit familiar; I think I had come across it before. I am only 18 months self taught in my spare time. Makes the self join loop in Larry's task example look so simple. You have not use recursive functions? You want me to learn this, I think you should make a recursive function!!! In jest,. you must be a genius and it would only take you 10 minu
  7. Hmmm, hartley-how do you auto fill left and right position for tree? This must be entered by hand or an algorithm? I am not very patient am I?
  8. Ok, reading this. Being my experience level I can not argue approach. Right off I am seeing that this returns position (design). I want to be able to produce CSS div tags. Will I be able to with this method? This is mandatory for me. I wish I had 12 hour days to study and learn everything out there but I only get a couple hours/ day. Another important criteria is to produce XML. You must understand if I want to produce information to 100, 800 domains on many servers i have only one method to do this that makes me feel as a business owner will satisfy producing my product. XML data.
  9. I can see entering 100 horses a day easy, maybe more. So the reorder each time a record is added sounds scary.
  10. hmmm, much to digest. I guess I don't understand why I would separate the tables. would I not take chance of duplicate entries for sire/dam? It takes time for me to absorb, so my initial reaction is just confusion. descendants as a word to me means top down, not bottom up. Here is some data. Not that I have entered enough to get really good charts yet. Most is sire => 1 and dam=> 2. I can add more flushed out pedigrees is that helps. Array ( [horse_id] => 1 [horse_name] => Unknown Stallion [sire_id] => 1 [dam_id] => 2 ) Array ( [horse_id] => 2 [horse_name
  11. While getting file, here is a link of an old page. Pedigree does not link, static text probably in a table. http://cloverlone.com/Broadway.htm
  12. Ok Antonio. I will fire up the computer. Give me a minute.
  13. I don't see the connection on that link. The id in my database is not because of position, it is an autoid in a list of maybe thousands of horses. I can see that position will need a number but example has position being the id. First horse queried based on variable sent to form. Then query should retrieve fatherid as an array(id, name, fatherid, motherid), motherid as an array (id, name, fatherid, motherid), etc. trick is in writing a function to shorten long worded query.... It is long. I got to second grandmother and knew was best to abort and get function to do work. Maybe I want a six gen
  14. 1for unknown father and 2 for unknown mother, not 0, 1.
  15. Yeah, a clue. I do have my table as above with the I'd, name, fathered, motherid. ( Going to whack spell check),..When I add a horse there is auto fill of 0- unknown father and 1-unknown mother. This is important for adding a horse who does not have parents already in database. Once horse name, year born, proper search that horse does not already exist,.. Is entered then one can edit update and go through same process for parents. That is more than need know for this venture. My search is pretty cool though. Have not used Ajax yet but,.. Back to pedigree and goals. I am building a massiv
  16. Embarrassing possibly, but here we go: ie page 20 $peoples= array(); While(list(I'd, name, fatherid, motherid) = mysqli_fetch_array($r, Mysqli_num) { $peoples [id][fatherid][motherid] = $people; find_fathers($people[0]); // back to top of page 19 Function_find_fathers($father) { Global $peoples; For each ($fatherid as $id => $father) { if(isset($peoples[$fatherid]); Find_fathers(peoples[$fatherid]); } } Just a start,.. I don't like the infinite side. Unnecessary. Recursion makes my brain hurt. No matter how I approach I do not see being a
  17. Ok Antonio, I know everyone here is brilliant... Pedigree of a horse is no different than a person really. Table:I'd, name, fatherid, motherid. I have a field for gender but I don't think that is necc. If I had some code that worked I would not be here with my first cup coffee. . And on iPad,.. Typing is slow. I have built SELECT statements that do work, they just get really long and ugly to keep up with: 'SELECT I'd, name, fatherid, motherid FROM genealogy WHERE Id = $id' UNION sELECT a.I'd, a.name, a.fatherid, a.motherid FROM a.genealogy WHERE fatherId = I'd uNION,... Not typ
  18. I am trying to figure out best approach to a function similar to yours starting pg 18. But I am building an actual pedigree, 3 or 5 generations. 3 generation as an indexed array count to 6 would gather the amount info needed. I have brain fry. seems like this should be really easy. Fields are horseid, horse name, sireid, damid. Sire and dam id are horse id of course. I will be printing into divs rather than ul/li. That is why I need to get accurate return in order. Playing with uksort. Do you think Sire and dam separate or single functions? Any suggestions are much appreciated.
  19. Woke up with some ideas to try. Will write a herd of if else and post to a new page for now. If someone enters a new year born but nothing else they will skip on,.. Post back to same page actually would be best. But if change sire or dam would post to a list no different than your search form, just two at once. I just add radio button and continue the form to a final; carry the gender, year born and original horse ID past second page in hidden fields. Update q on this final page. Then I can work towards getting it on one page from there. Read Ajax grid this am and that can wait!!! Good
  20. Ok, say a form (update) has following fields Horse Id is passed hidden Horse name is visual reference Sire name (I'd) Dam name (ID) Gender Breed Year born If there is a thousand names in db a drop select is not the way to go to change sire and or dam but I don't want duplicate entries either. So if either of the sire or dam fields need to be edited I would like to return a page with 'like' suggestions as radio buttons; choose the correct sire dam with option "I don't see the horse" and add new name at that point. From there actual update happens... Many horses could be named X
  21. I hope this is the right place to ask this question. I have been building a site with pedigrees and using parts of multiple Ullman books. My regular site search is working well returning a table with edit button. I can type in say 'ca' and returns all names with ca in the name. I have year born edit/update working but have not got my father/mother edit/update to work yet. I am asking theory question rather than code question... I do not want to use a drop list to update father/mother because that list will be much too long. (as in 'artist' chapter 17 page 550 PHP6 MySQL 5) I
  22. I am only a year into programming but have many years CSS.. One minor adaption you might consider is fixed height on some of your boxes. This may limit your sentence length and lead to a few other decisions. Counting characters not necc going to work because of viewer font size settings. Again I am new to php .. Congrats !!!!
  23. Then adding the base URL for module kills the sticky... Grrrr this is something stupid.
×
×
  • Create New...