• Welcome to WooUSEFUL by PHPVIBE . Please log in.

[ Video Sharing CMS v4 ] Video.php function guess_next($list=null) error

Started by korobert,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

korobertTopic starter

I have problem in video.php


function guess_next($list=null) {

this select not always working:

$videox = $db->get_row("SELECT id ,title from ".DB_PREFIX."videos where id > $video->id order by id asc");

Here not working:

http://fatcaviar.com/video/23468/australia-2001-kimi-raikkonen-overtaking-jenson-button-and-giancarlo-fisichella/

Here working:

http://fatcaviar.com/video/101496/lindsay-lohan-secrets-photos/

If i change for  this working

$videox = $db->get_row("SELECT id ,title from ".DB_PREFIX."videos where id = $video->id order by id asc");


Please helpme.

Thanks Robert
  •  

Marius

What that query does is get the larger id (newer videos), if you put equal it will query the same video over and over again.

Can you enable error reporting and reverse it back? So I can see the actual error. http://www.phpvibe.com/forum/how-to/(how-to)-debugging-phpvibe/msg14380/#msg14380
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

korobertTopic starter

[05-Nov-2014 15:18:36 Europe/Bucharest] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 65552 bytes) in /home/fatcaviar/public_html/lib/functions.php on line 320
  •  

Marius

If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

korobertTopic starter

SUPER
THANK YOU!!!!

Yes we have more than 100,000 videos.

I set 96M PHP memory limit, and working fine.
  •  

Marius

Glad to help, run some optimize command on your database from time to time via phpmyadmin.
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

korobertTopic starter

Thanks

I know it, i do it regulary!  :)

(I finished to use the nginx server :) )
  •  

Similar topics (7)