timmah1 Posted June 2, 2008 Share Posted June 2, 2008 I posted this yesterday and got some insight, but I feel I didn't post enough about it. This site was coded by a college student for his class project, now the owners want to change one thing. This link is all the pages because i can't post them all here, to long http://www.cheezyfries.net/dob/00-DobQues1t.zip The view history page shows the actual SQL statement, they want that gone. They don't want to see Updated with RegisteredName='Electra\'s Aryan Jet Stream', Alias=NULL, CallName=NULL, AKC='WF099619', AKCStudBookYear=1984, AKCStudB...... Now, you can go to the test site if you want and login and test everything, to see how it works if you want. http://cheezyfries.net/dob/ Click Visitor, then search by letter, click a dog, then at the bottom, click view edit history and you'll see what I mean. I really need to try and find out the problem if anybody here could help me out. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 What exactly is your question? Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 When you view the Dog History, it shows the sql statement Michelle Kramer on 2008-06-02 08:02:25 made change 'Updated with RegisteredName='A + R Sold Rock II', Alias=NULL, CallName=NULL, AKC='WE513431', AKCStudBookYear=NULL, AKCStudBookMonth=NULL, CKC=NULL, CKCStudBookYear=NULL, CKCStudBookMonth=NULL, OtherRegistration=NULL, OtherRegistrationCountry=5, Sex='M', Genotype=1, Colour=2, Dentition=1, Height=NULL, Length=NULL, AdultWeight=NULL, DNAprofile=NULL, BirthCountry=4, CauseOfDeath=NULL, birthYear=1979, birthMonth=9, birthDay=12, deathYear=NULL, deathMonth=NULL, deathDay=NULL, confirmedCauseOfDeath='Unknown', SireID=NULL, damID=NULL, namePrefix=NULL, nameSuffix=NULL, publication1=' ', publication2=' ', publication3=' '' Plus it shows the edits Michelle Kramer on 2008-06-02 08:02:47 made change 'Removed All Progeny for 1526' They just want the history to show Michelle Kramer on 2008-06-02 08:02:47 made change 'Removed All Progeny for 1526' And not the statement Update with..... Does that make sense? Quote Link to comment Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 I guess, you need to post the relevent code and let us know what youve done that isn't working. Were not here to modify code for you. Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 I tried posting the code, but it exceeds the limit. I'm not asking for you to modify the code for me, just help me figure out why the statement is being shown. Here is the part of the code that displays the history function editHistroy($DOGID) { //$response =""; $count = performSQLMultiRow("select firstname, lastname, logentry, changeDate from editHistory left join useraccounts on editHistory.uid = useraccounts.uid where keyValue = $DOGID AND tableName='DOG'",$result); /* Old query "select firstname, lastname, logentry, changeDate from editHistory,useraccounts where keyValue = $DOGID AND tableName='DOG' AND editHistory.uid = useraccounts.uid" */ while($editHistory = mysql_fetch_array($result)) { if ($editHistory['firstname'] == NULL) { $response .= "Unknown"; } else { $response .= $editHistory['firstname']; } if ($editHistory['lastname'] != "NULL") { $response .= " " . $editHistory['lastname']; } $response .= " on " . $editHistory['changeDate'] ." made change <br><span class=fontsize1emnormalPROFILEIndented>'" . $editHistory['logentry'] . "'</span><br><br>"; return $response; } /* for($i =0;$i < $count ; $i++) { $editHistory = mysql_fetch_array($result); if ($editHistory['firstname'] == NULL) $response .= "Unknown"; else $response .= $editHistory['firstname']; if ($editHistory['lastname'] != "NULL") $response .= " " . $editHistory['lastname']; $response .= " on " . $editHistory['changeDate'] ." made change <br><span class=fontsize1emnormalPROFILEIndented>'" . $editHistory['logentry'] . "'</span><br><br>"; } echo $response; } */ Quote Link to comment Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 Have you tried looking in the database to see what field this section is written too? A wild guess would be the logentry field. All you'd need do then is not select it in your query. Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 Here is the database structure. logentry is set to blob, not sure how I could view that, but I'm pretty sure that's what holds all the info for viewing the history Field Type Null Default Comments edithistoryID bigint(20) No uid bigint(20) No 0 logentry blob No changeDate datetime No 0000-00-00 00:00:00 tableName enum('USERACCOUNTS', 'DOG', 'HEALTH', 'VIGNETTES', 'PHOTOS', 'BREEDER', 'NOTES', 'akaKennel', 'breederDog', 'kennel', 'kennelOwners', 'ownerDog', 'people', 'progeny', 'sibling') No USERACCOUNTS keyValue bigint(20) No 0 Quote Link to comment Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 So remove the parts relating to logentry. Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 When I tool out logentry, the history only shows Michelle Kramer on 2008-06-02 08:02:25 made change '' It no longer shows what was changed. Quote Link to comment Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 Isn't that the entire point of your question? Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 no, it's not. I don't want this to show 'Updated with RegisteredName='A + R Sold Rock II', Alias=NULL, CallName=NULL, AKC='WE513431', AKCStudBookYear=NULL, AKCStudBookMonth=NULL, CKC=NULL, CKCStudBookYear=NULL, CKCStudBookMonth=NULL, OtherRegistration=NULL, OtherRegistrationCountry=5, Sex='M', Genotype=1, Colour=2, Dentition=1, Height=NULL, Length=NULL, AdultWeight=NULL, DNAprofile=NULL, BirthCountry=4, CauseOfDeath=NULL, birthYear=1979, birthMonth=9, birthDay=12, deathYear=NULL, deathMonth=NULL, deathDay=NULL, confirmedCauseOfDeath='Unknown', SireID=NULL, damID=NULL, namePrefix=NULL, nameSuffix=NULL, publication1=' ', publication2=' ', publication3=' '' Just this to show Michelle Kramer on 2008-06-02 08:02:47 made change 'Removed All Progeny for 1526' Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 2, 2008 Share Posted June 2, 2008 Then take out the line that echos it.... >_> Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 Sounds simple enough, but it's not that simple. I don't know why that part of the statement shows up. That's what I'm trying to find out Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 2, 2008 Share Posted June 2, 2008 Find out which line echos the stuff you don't want....and see where it gets that variable from. >_> Quote Link to comment Share on other sites More sharing options...
timmah1 Posted June 2, 2008 Author Share Posted June 2, 2008 The part that echos the information is this echo $response; the $response is joined with other information, so just taking out the $response takes everything out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.