Page 1 of 1

Help with SQL

PostPosted: Mon Nov 05, 2007 10:00 am
by goose36
My SQL Database keeps messing up.



I keep getting something like this

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/apache2/htdocs/vicidial/AST_timeonVDADall.php on line 609

how do I make that go away.
It keeps occuring maybe twice per day.. and it is starting to get annoying.
I have told my tech numerous times to help me or show me how to do the fix for it because i can't keep calling him and wait for that to get fixed..

I need it fixed right away..

Can anyone explain to me what may be causing that to happen more consistant?

and what is it that I need to do to fix it and keep it fixed.

PostPosted: Mon Nov 05, 2007 2:39 pm
by mflorell
What is the SQL query right above that line in that script?

PostPosted: Mon Nov 05, 2007 2:40 pm
by chadahm
Well, there could be a number of things the problem...

mysql_num_rows() is a PHP function, it will error if there is no resource only on a sql result set defined. if there was 0 results, as it would return a 0 as it's output and not error.

Have the pages been modified? I've never seen that report do that out of the box. If so, I would change your error_reporting in php.ini. I've seen some errors happen where there is no campaign information.

http://us3.php.net/manual/en/function.error-reporting.php

PostPosted: Tue Nov 06, 2007 1:11 pm
by devafree
hello

maybe the table queried got marked as crashed?

devafree

PostPosted: Tue Nov 06, 2007 7:30 pm
by nobesnickr
the exact same thing just happened to me today and now no calls can go out. Asterisk works fine and can manually call out through Xlite but nothing from Vicidial.

Asterisk CLI doesnt show any activity from Vicidial

Basically we were working great all day than we got down to about 25 dialable leads and the server completely locked up, had to hard boot (NOTHING was reacting)

When I booted back up we had this error.

Any help would be GREATLY appreciated

PostPosted: Tue Nov 06, 2007 8:21 pm
by nobesnickr
I figured it out on my end (I think)

my table vicidial_live_agents was corrupt

ran
repair table vicidial_live_agents

in mysql and it looks like that part of the issue has been solved

hope this helps!

this is how i solved it

PostPosted: Fri Nov 09, 2007 3:57 pm
by goose36
I had my tech install phpmyadmin and with that it repairs the tables automatically without me doing anything.

if you dont know how to install that, see if any of the guys can help with it.

:)

PostPosted: Fri Nov 09, 2007 4:24 pm
by devafree
hello

thats very interesting, I did not know phpMyAdmin could check tables and repair them automatically.


Any links on howtos, cannot ssem to find at the phpmyadmin documentation site.


Regards

Devafree

PostPosted: Fri Nov 09, 2007 9:09 pm
by nobesnickr
it didnt repair for me but it helped me figure out what was going on.

I have Ubuntu and just used the lazy mans way of getting and install the package

apt-get install phpmyadmin


a quick google search should turn up a how-to for any operation system you have