/    Sign up×
Community /Pin to ProfileBookmark

Can you tell me what this line of code does?

Can you please tell me with this line of is doing:

“`$get_videos = $db->rawQuery(“SELECT DISTINCT(v.id), v.* FROM u_paid_videos AS upv LEFT JOIN ” . T_VIDEOS . ” AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} ORDER BY upv.id DESC”);“`

and also what this line of code does:
` $get = $db->rawQuery(‘SELECT * FROM ‘.T_VIDEOS_TRSNS.’ t WHERE `paid_id` = ‘.$user->id.’ AND (SELECT id FROM ‘.T_VIDEOS.’ WHERE id = t.video_id AND `is_movie` != 1 AND user_id NOT IN (‘.implode(“,”, $pt->blocked_array).’)) = video_id ‘.$rented_movies.’ ORDER BY id DESC LIMIT 20′);`

I look forward to any assistance

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmOct 08.2021 — They each produce a set of query results assuming that there are no issues with the query statements themselves.

Is that all you need to know? Kinda odd.
Copy linkTweet thisAlerts:
@NogDogOct 08.2021 — And it looks like $db is a custom database class, since there does not appear to be any rawQuery() function in PHP that I can see, so we don't even know what $db->rawQuery() returns.
Copy linkTweet thisAlerts:
@chrisjchrisjauthorOct 08.2021 — @ginerjm#1637967

@ginerjm#1637967

thanks for your reply. Can you please be more specific regarding what the line of code is doing?
Copy linkTweet thisAlerts:
@chrisjchrisjauthorOct 08.2021 — @chris

jchrisj#1637969

@NogDog#1637968

thanks for your reply. Can you please be more specific regarding what the line of code is doing?
Copy linkTweet thisAlerts:
@ginerjmOct 08.2021 — @chrisjchrisj#1637969 What part of what I wrote doesn't come through to you? As you have been told by two of us, it seems to be executing a query for you and it returns the results in the 'get_videos' variable.

You have given us a snippet of a map with no context to tell us even what country the map represents and you want us to navigate with it. Does that make sense to you?
×

Success!

Help @chrisjchrisj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...