Jump to content

morrisjohnny

Members
  • Content Count

    300
  • Joined

  • Last visited

Community Reputation

0 Neutral

About morrisjohnny

  • Rank
    Member
  • Birthday 01/29/1990

Contact Methods

  • AIM
    fastb01
  • MSN
    jnymris@hotmail.co.uk
  • ICQ
    0
  • Yahoo
    ermnameless@yahoo.co.uk
  • Skype
    johnny.morris

Profile Information

  • Location
    Berwick-Upon-Tweed, NE England, UK
  1. you can ignore this. It turns out they had been using a third party rewriting software and not mod re-write !
  2. I'm having problems migrating one client from web server to another. I have attached the current .htaccess in use at the bottom. On the current site visitinghttp://domain.com/index.php/about-ushttp://domain.com/index.php/news-eventshttp://domain.com/index.php/newsall return correct pageson the new website these pages load fine However going to this pagehttp://domain.com/index.php/news/23/87/Gardens-Opening-for-Leuchie-House-2012returns a Not Found The requested URK was not found on this server. (a side note which may help is)The hyperlinks on the live site shows links as index.php/about-us fo
  3. in order to migrate from MS SQL to MySQL you can just export from MS SQL and import into MySQL both support export and important and because they are both based on SQL they should function okay in terms of accessing the database depending on the functions you've used you may have more problems for exmaple MySQL can use Limit where's MS SQL does not as one example. You should not need to publish a MS SQL using an IP address. we have a ms sql server and a web host that is located in a DMZ the web host and still talk to our MS SQL database without any problems and that does not have a public IP.
  4. I'm currently working for a company who i'm assuming have a pre 4.1 MySQL as when i'm trying to connect with PHP 5.3.8 and it is complaining about the insecure authentication Now i've noticed you need to run the following commandSET old_passwords = 0;UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1;SELECT LENGTH(Password) FROM mysql.user WHERE User = 'testuser'; FLUSH PRIVILEGES; However considering this database is accessed by a number of different systems if I run this command for one of the users will this affect all other users? as i'm not 100% cer
  5. so using timestamps how would i be able to identifiy midnight to 8:30 and 5:30 till midnight monday to friday? i now understand how the dates methods i'm using (thank you PHP) is converting everything from all the different values. I know this code is the worst i have ever seen and coded i just don't know the best way to do this. It's due for tomorrow hence why i'm 'just carrying on with the scruffy way' i will be going back and look to tidy this up. (that's why i'm interested in timestamps)
  6. Thanks theScientist yeah the cases above are what i'm trying to program. Whats the difference between timestamps and dates? the data has to be stored as a date. Working with dates/timestamps are probably my weakest point hence why i'm really struggeling with this. I've managed to almost get it working (so i think) however when i tried to convert date_format($start,'u') (start is a new DateTime object) it sets the unix time to be ZERO ?at the moment i'm putting in static data such as business opening hours but at point this will need to be from a database value. Here's my current code which is
  7. Hello All.I'm currently working on a custom reporting function.What i'm looking todo is extract the total time elapsed ($start) for each ticket during business hours the business hours are:mon-fri: 8:30-17:30 So if a ticket was loggedMonday 8:00 and closed: Monday 9 it's 0.5 (half an hour because the SLA/Business hour states from 8:30)Monday 13:00 and closed: Tuesday 12:00 it's 9 (Because 23hours (actual time between create_time and date_completed) - 14(number of hours the SLA/Business hours does not run for = ))Friday 17:00 and closed: Monday 09:00 its 1 (again because our buiness hour stops
  8. <?php //Start sessionsession_start(); //Include database connection detailsrequire_once('config.php'); //Array to store validation errors$errmsg_arr = array(); //Validation error flag$errflag = false; //Connect to mysql server$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);if(!$link) { die('Failed to connect to server: ' . mysql_error());} //Select database$db = mysql_select_db(DB_DATABASE);if(!$db) { die("Unable to select database");}//$email = $_SESSION['SESS_EMAIL']; //Select everythingmysql_query("SELECT * FROM members")or die(mysql_error()); //Update the hourly moneymysql_query(
  9. Hello DubbelDam, Sorry i forgot last night it's in my phone to remind me tonight. Hax? it kind of died. but its still online i believe agian will pop back tonight with details. Try referencing the link directly for example http://www.(SERVERNAME)/mafiawarstest/moneyadd-exec.php you will need to of course make sure no log-in is required to this page. or no sessions are set as these will not be set by the serverbasically you want to do foreach($users as $user) mysql_query(UPDATE `tablename` SET 'money'='money'+$moneyamount where id=$user->id); there is a MUCH better way to do that but ag
  10. depending on the type of hosting you are using depends on the answer Linux: Create a CronJob (there will be an option in the CPanel usually) http://en.wikipedia.org/wiki/CronWindows: Task in Task Scehule or their should be something simlar in the CPanel. At home (I'm at work) i created something that checked the last time the user logged in and then worked out how much more money they required. back in the day when i created a mafia game. i'm sure i have the scripts lieing around somewhere if i remeber i wil post back tonight ! (around 6 hours time)
  11. Solution SELECT * FROM (SELECT row_number() OVER (ORDER BY id ASC) as rownum, * FROM CPLogs /* Any Filtering In Here*/) as a WHERE a.rownum BETWEEN 10 AND 20 I've personally tested SELECT TOP 10 * FROM CPLogs WHERE id NOT IN (SELECT TOP 20 * id FROM CPLogs ORDER BY id ASC) ORDER BY id ASC Supplied by JustSomeGuy (Not Tested)Okay coming from MySQL i've become used to using Limit and Offset in order to create a nice pagination However as part of a project I've had to used MS SQL which of course does not have LIMIT so instead i'm using TOP . . . okay trying to use TOPas far as i'm awareThe
  12. Hi firstly please excuse my stupidity hereRight before I ask, Please bare with me as I'm a total newbie to Java script/programming what everI've been given a task to take variables (currently using HTML as this ties in with other projects) and then insert then into what I think (pretty sure) is a Java program, is their anyway that this is possible in HTML or not? it has to be cilent side due to restrictions.I may add the Java program is running inside it's own window and cannot be integrated into the web page.If their is also a way to extract the information from the Java page on a click on a
  13. Okay I'm having problems reading data from a port (COM3)I'm running a program VirtualGPS to emulate a GPS receiver unit which is running on COM3now what I'm trying to do is read this data in and save it locally to my database. although at the moment i'm just trying to print the data out to screen.I'm receiving these error messages:Warning: Specified serial port is not valid in C:\Users\Jonathon\Desktop\XAMPP\htdocs\CentraFuse\php_serial.class.php on line 111Warning: The device must be set before to be open in C:\Users\Jonathon\Desktop\XAMPP\htdocs\CentraFuse\php_serial.class.php on line 137War
  14. Okay i have four variables$team1, $team2, $team3, $team4i'm trying to see which team has be biggest number so at the moment i'm using this code. <?phprequire("Connections/request.php");set_time_limit(0); //Run Drag Racesmysql_select_db($database_request,$request);$get=mysql_query("SELECT * FROM `league_drag` WHERE `RaceNo`=0");while($show=mysql_fetch_object($get)){ //Do Team 1 $team=mysql_fetch_object(mysql_query("SELECT * FROM `teams` WHERE `id`='$show->t1id'"));echo mysql_error(); $engine=mysql_fetch_object(mysql_query("SELECT * FROM `company_engine` WHERE `id`='$team->eid'"));echo
  15. Thanks Guys, but i changed it to Joins as the area i was being marked on was about sub-selects i though i would have to do it as a subselect however i admitted defeat and done it all in a joinHere's the code i used incase anyone else is wonder and for future use SELECT concert.concert_venue, concert.con_date, composition.c_titleFROM concert, performance, composition, has_composed, composer, musicianWHERE concert_no = performed_inAND performed = composition.c_noAND composition.c_no = has_composed.cmpn_noAND cmpr_no = composer.comp_noAND composer.comp_is = musician.m_noAND m_name = 'Andy Jones'
×
×
  • Create New...