-
Posts
251 -
Joined
-
Last visited
Never
Posts posted by Tandem
-
-
I'm trying to move my databases to a different server. My original server (local) version is 5.0, but the new server is 4.1.2 and my host says that they cannot restore the database with the dump file i gave them because of this. What's the best way to remedy this?
Would it be possible to download 4.1.2 and move my database to that version and then create a dump file from that server? -
I'm moving my site from a local test server to a 'real' server, and i want to import a database to my new mysql server. I understand that i have to create dump text files to re-create the database and tables in the new server but i don't know how to do it. Btw i only ever used the command line client on my local server, and the new server i must use phpmyadmin, and all the google searches i can find are for phpmy admin.
Could someone please tell me how to do this?
Any help is appreciated -
On my site i have made a sort of messaging sytem for users. I want users to be able to select the messages that they want to delete via checkbox. Can anyone explain how to retrieve mutliple checkbox values?
If i'm not making sense or you need more details, just say.
Thanks for any help. -
Works perfectly, thank you very much.
-
Could anyone demonstrate to me a preg match that detects if the subject contains only spaces?
I can't work it out myself.
Thanks for any help. -
Awesome, thats exactly what i need, thanks.
-
If i want to order some query results by a factor that has no sort of reasonable order, but i know which order they should be in e.g
1. Dog
2. Cat
3. Lion
or something like that, how would i go about doing that?
If you need more information or i don't make sense, please ask/say.
Thanks in advance for any help. -
On my site i have a profile editor where members can edit their profiles and if they want to, add music.
Whenever anybody views a profile that has music on it, a pop-up appears saying: Click to run a active-x control on this webpage.
How, if possible, can i stop this pop-up from appearing? -
I fixed it, it was just a typo in one of the variable names :P
-
I'm trying to make a timer for part of a game that i am making. If i member does a certain thing it puts them a 'jail'. For this particular instance, i want the timer to start at 40 and countdown, and once the time has passed, they be removed from the jail. Here's what i've got so far.
[code]
<?php
if ($got_inmates[1] == 40){
$jail_time = mysql_query("SELECT * FROM JAIL WHERE TIME > DATE_SUB(NOW(), INTERVAL 40 SECOND) AND USERNAME='$got_inmates[0]'");
$jail_time_check = mysql_num_rows($jail_time);
$get_sentence_time = mysql_query("SELECT ADDTIME(TIME, '00:00:40') FROM JAIL WHERE USERNAME='$got_inmates[0]'");
if ($jail_time_check < 1) {
$remove_from_jail = mysql_query("DELETE FROM JAIL WHERE USERNAME='$got_inmates[0]'");
}
if ($jail_time_check > 0) {
$got_sentence_time = mysql_result($get_sentence_time, 0);
$timer1 = date('Y-m-d H:i:s');
$timer2 = strtotime($timer1);
$timer3 = strtotime($got_sentence_timer);
$timer4 = $timer3 - $timer2;
$timer5 = date("s", $timer4);
}
if (empty($timer5)){
$timer5 = "0";
}
}
?>[/code]
The problem is that the timer starts at random places, when i want it to start at 40. Can anyone help me out and tell me how to fix it?
Thanks in advance for any help. If you need more info just ask. -
I managed to format it with the date function. Thanks for all the help and replies!
-
Is there anyway i can format it so i can use it so i can display for example 2m 30s rather than 150s?
-
bump
-
I'm getting kinda confused here. Check this out.
$time5 = "2006-07-27 05:05:51";
$time4= date('Y-m-d H:i:s');
$time = $time5 - $time4;
echo "$time";
The output i'm getting is: 0
Just a zero by itself!
How come? -
How do i subtract the date from a variable date using single quotes?
Both are in the same format, i just don't know the syntax of single quotes and periods very well and am not sure how to use it in this situation.
e.g echo 'today '. $time2 .' - '. date('Y-m-d H:i:s') ."\n";
What should i change this to to make it actually calcualte the answer? -
*please skip to my latest reply*
Ok, i'm tryin to calculate the difference between two times. One is a small distance into the future and is in the format(0000-00-00 00:00:00). Lets call this x.
The other is the current time, lets call this y.
I want to calculate how long it will be until y = x.
How should i go about doing this?
If you need more info just ask. -
Wouldn't it be easier to use the PEAR bbcode parser?
-
I've been trying to implement bbcode onto my website, but it's not working out. I just don't understand how to do it, and just about all the tutorials i come across are terribly written/wrong.
I did find a custom made file that parses tags, but the if you miss off a closing tag or make a similar mistake, it would destroy the page's layout, and i don't want to user input pages to be able to do that.
Can somebody point me towards some good documentation for using the PEAR bbcode parser or possibly explain how i go about using it themselves?
Thankyou for any help. -
Ok thankyou :)
-
Whats the best way to make html or javascript not work on a user input page like a guestbook?
-
Do you have php.ini configured to properly work with your smtp server?
-
Ok, i will do, thankyou for the help.
-
MySQL 5.0 and windows.
-
It returns:
mysql> repair table users;
+-----------+--------+----------+---------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------+--------+----------+---------------------------------------------------------+
| gng.users | repair | note | The storage engine for the table doesn't support repair|
+-----------+--------+----------+---------------------------------------------------------+
1 row in set (0.00 sec)
$PHP_SELF
in PHP Coding Help
Posted
I was wondering if there is an alternative, or a fix for this? and if any could tell me why it's happening that would be cool too.
Any help appreciated.