« first day (1265 days earlier)      last day (3908 days later) » 

23:07
Is this ugly car?
@ircmaxell ^
It won't format idk why
lol
let me try copying again
CTRL + K
$current_resets_available = WooThemes_Sensei_Utils::sensei_check_for_activity( array( 'post_id' => $post->ID, 'user_id' => $current_user->ID, 'type' => 'sensei_quiz_resets' ), true );
	foreach ( $current_resets_available as $key => $value  ) {
		if ( isset( $value->comment_ID ) && 0 < $value->comment_ID ) {
			$dataset_changes = wp_delete_comment( intval( $value->comment_ID ), true );
	} // End If Statement
} // End For Loop
There we go
Ok, so $current_resets_available is getting an object from a database, then it gets deleted from the database, is $current_resets_available still holding the old database value? I basically can't update it completely so I basically want to delete it and put in a new value. So in short get value, delete, modify old value and insert again
@BrandonGelfand Why not just run an update query? Why go through the trouble of deleting the old value if you're just modifying it?
23:22
@cspray The update query will only allow me to change a certain parameter that I don't want to. I know its weird, but I can't at the moment
@BrandonGelfand How is that?
Its just how its been built, the logging function doesn't have an update except for the id
and date
@BrandonGelfand Don't use the logging function then?
I cant
I have to
@cspray will it still have the old value if I call it after?
after the delete that is
Well, what you're doing should be handled by an UPDATE query. Without more information I have to assume there's some shitty WP related issue why you can't or some team management issue why you can't
23:25
Its not WP related, its just the plugin.
And since I have to work in WP I don't do work in it without pay
Yep and that plugin is shitty because it is built for a shitty architecture
I am having the logging do something it wasn't intended for
Just write an UPDATE query and manually call it against the DB. That would be better than what you're trying to do now
Its not crappy
WP is something it is not intended for
23:27
@cspray will it hold the old value?
You'll have a hard time convincing me that any code related to WP is not shitty
@BrandonGelfand I don't know, it's WordPress.
Why are we diverting away from the main point of the question? Its just regular PHP
So if this was a regular php script, would it hold the old value?
The main point of the question is: "..in short get value, delete, modify old value and insert again.."
And I'm saying that the real solution is: "Run an UPDATE query and use SQL as it was intended to be used"
Will my way work to though, if UPDATE isn't an option?
No one here knows WP from top of their head, so that's vague question.
23:30
Ok, let me rewrite this in non wp terms
We'll still say it is a vague question because we won't know the internals of the system you use in its place
Just test it :P
@BrandonGelfand how do you perform delete? Yeah, it should hold the value, simple var_dump would show that to you right away.
Test it yourself.
Alright, thank you
I actually remembered another way though
That does allow for update
so I just need to rewrite an action, but it should work.
You're hacking it, but WP is a hack itself, so...
lol, pretty much
just the plugin though
its a default wordpress function I am gonna use, just need to pass along an array

« first day (1265 days earlier)      last day (3908 days later) »