Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-06-11 11:25:48

Eri
Member
Registered: 2011-03-18
Posts: 977

mysql problem

i am getting error on mysql with the most used query on ASP

		$this->db->query("UPDATE #__video
			                  SET total_views = total_views+1,
			                      view_date = '".$date."',
			                      view_time = ".time()."
			                  WHERE video_id = ".$this->video_id." LIMIT 1");

I do not understand why LIMIT 1 is used there

and  view_date = '".$date."',

Also if someone do not use the watched videos on front page there is no need to use  view_time = ".time()."  right?

Last edited by Eri (2012-06-11 11:26:21)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#2 2012-06-11 15:10:41

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: mysql problem

Basically both view_date and view_time is used for compatibility with previous versions, it will be removed in future versions. Limit 1 is because mysql finishes searching once it finds the video_id in the case (without limit 1 mysql searches if it finds another row with the same video_id). You can remove both view_date and view_time if you dont use the watched videos.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB