Jump to content

craygo

Staff Alumni
  • Posts

    1,972
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by craygo

  1. if your web server uses cron jobs, you can run a script every hour with that. Do a search on cron jobs here and you should find it no problem. Ray
  2. I logged in and when I click member list, I get a quick white page with php error but then it goes right into the page and it is all messed up. You should add "die();" in there so that the script ends when errors occur, just until you can debug. Looks like there are some errors in there but it passes by so quick I can't see them. Ray
  3. Well I want to return the processes on the server that is running the webpage. It is my game server so I am writing scripts to shut down my dedicated servers. :) Ray
  4. Do you have cookies active on your PC? Your web setting might be stopping not the web server. Your sessions are being stored as cookies so your web setting might be the problem not the web server. If you want me to try and there is not any problem with it, give me the link and I will try it out. Ray
  5. setting for sessions are in the php.ini file. you might have to check with your hosting company and see if they are setup correctly. Usually you do not have access to this file so will have to contact the hosting company. If you have access you can post here and I will help best I can. Ray
  6. each page MUST start with session_start(); the login page and every page you use after. This should be the first line in your script. Ray
  7. I need a script to list tasks by a particular user. Can someone point me in the right direction. Pretty much what I want to do is get a list of processes that are running by a particular user. Thanks Ray
  8. I have a site i want to run commands on and return the result for later use. I will give and example: i have a process running app | PID | user srcds.exe 2514 johnblack i have the username for each process i need to deal with, and that user is only running the one process. This what I need to do. 1. Search the username and see if the process is running and get something to say it is. 2. Get the pid of that process. 3. Be able to shut that process down. thanks Ray
  9. When you start using spaces and sybols, they tend to interfer with scripts and other programs. Take for instance. if you have a username john's, if you try to reference that name in php with something like this $username = 'john's'; you will get an error because of the single quote in the username. you would have to add $username = 'john\'s'; to get it to work. Now imagine if you had a script that put names into arrays, you would be in a world of hurt trying to figure out why things are not working correct. Hope that explains it. It is not really a rule, more like a guideline to make life easier. Ray
  10. In order for your scripts to run from a web page you have to give the IUSR_xxxxx user (where xxxx is the machine name) full control of one under, permission to the wwwroot folder. Also when you add or change the permissions on the folder click the advanced button then click the "Replace permission entries on all child objects..." then click apply. This will set all permissions on lower files and folders the same as that one. Now when you copy or move a file to that directory the permission should be all set. Also you should give at least read/execute permission to your php folder to the same user. This will make sure your web pages can access extensions in the php folder and temp folders there as well
  11. you can store the arrays in a temporary table which should stay active as long as the person does not close the browser or you close the mysql connection in your code.
  12. craygo

    Joins

    I got it to work Thanks
  13. craygo

    Joins

    Nobody cares LOL
  14. craygo

    Joins

    is there a need to give the tables aliases?? this is what I have in my sql statement $qx = "SELECT roster.handle AS 'name', roster.real_name AS 'rname', "; $qx .= "EXTRACT(YEAR FROM servpay.paydate) AS 'YEAR', "; $qx .= "SUM(IF(servpay.paymonth = 1, servpay.amount, 0)) AS 'JANUARY', "; $qx .= "SUM(IF(servpay.paymonth = 2, servpay.amount, 0)) AS 'FEBRUARY', "; $qx .= "SUM(IF(servpay.paymonth = 3, servpay.amount, 0)) AS 'MARCH', "; $qx .= "SUM(IF(servpay.paymonth = 4, servpay.amount, 0)) AS 'APRIL', "; $qx .= "SUM(IF(servpay.paymonth = 5, servpay.amount, 0)) AS 'MAY', "; $qx .= "SUM(IF(servpay.paymonth = 6, servpay.amount, 0)) AS 'JUNE', "; $qx .= "SUM(IF(servpay.paymonth = 7, servpay.amount, 0)) AS 'JULY', "; $qx .= "SUM(IF(servpay.paymonth = 8, servpay.amount, 0)) AS 'AUGUST', "; $qx .= "SUM(IF(servpay.paymonth = 9, servpay.amount, 0)) AS 'SEPTEMBER', "; $qx .= "SUM(IF(servpay.paymonth = 10, servpay.amount, 0)) AS 'OCTOBER', "; $qx .= "SUM(IF(servpay.paymonth = 11, servpay.amount, 0)) AS 'NOVEMBER', "; $qx .= "SUM(IF(servpay.paymonth = 12, servpay.amount, 0)) AS 'DECEMBER' "; $qx .= "FROM roster LEFT JOIN servpay on roster.id=servpay.playid "; $qx .= "WHERE roster.title= 'OWNER' "; $qx .= "GROUP BY YEAR "; $qx .= "ORDER BY roster.id "; I have it being grouped by year but what happens when I insert a person for the year 2006 everyone's name goes away accept the one person that has paid for 2006.
  15. craygo

    Joins

    I have two table called servpay, and roster. They are joined by the field playid, id respectively. I want to include all the people from the roster table in a report even if they have no entries in the servpay table. How would I do the JOIN for this??? Thanks Ray
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.