Jump to content

Please help me out here, long one


timmah1

Recommended Posts

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.

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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;
}
*/

 

Link to comment
Share on other sites

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  	 

Link to comment
Share on other sites

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'

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.