Jump to content

php_b34st

Members
  • Posts

    168
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

php_b34st's Achievements

Member

Member (2/5)

0

Reputation

  1. I have managed to get it to work using max_execution_time instead of set_time_limit Thanks for the help
  2. I have just tried using set_time_limit however my host has this feature disabled. Is there any other way around this?
  3. No I'm not using a cronjob as I'm using a free server and i don't think they support cronjob.
  4. How would i increase the timeout? I have to update them all at once because its a clan leader board so it wouldn't work if some users were not updated.
  5. Hi, I am trying to loop through all of the users on my site and grab their game stats from another site to do this i am using fopen within a foreach loop, this works nicely for about 30 members but when it gets to 31 i get a time out error. Is there any way to get around this? Thanks
  6. Thanks for the replies, I do not think that the host allows curl either. Dont sockets use fopen() aswell?
  7. Hi, I am trying to use file_get_contents() but my host does not have allow_url_fopen enabled. Is there an alternative way to grab the data or do I have to get a new host? Thanks
  8. How would I count how many weeks it has been since a set starting date? if the starting date was sat 16th august and I check on sat 6th september it should be week 4. thanks in advance
  9. So, you want it to add a new row if it has the same code but a different name? No I want to update the row if it has the same code, I want to insert a new row if there is a new code Thanks for the help I will try to use mysql_affected_rows as you suggested
  10. Sorry if I was not clear. 1. Yes I am trying to update the database the code and name will never change so i decided to update using code as the key however if there is a new name i need to insert a new row. 2. The problem is when i add the id auto increment column it does not update anymore it just adds new rows even if there is already a similar entry just to clarify I am adding a new column called id rather than updating the coce column so the new table will look like this: id | code | name | club | price | points and id is now the primary key rather than code (the code is a pre defined code, id will auto increment and be there for reference to other tables)
  11. I have a table in my db: code | name | club | price | points At the moment code is set as primary key so when I use the following script the table gets updated correctly: $query = "INSERT INTO playerlist (code, name, club, price, points, position) VALUES ('$listitem[0]', '$listitem[1]', '$listitem[2]', '$listitem[3]', '$listitem[4]', '$position') ON DUPLICATE KEY UPDATE points=$listitem[4]"; mysql_query($query) or die('Error, insert query failed'); however now I am trying to add an id auto increment primary key column but the above script stops working correctly as its now referencing from id rather than code. Instead of updating a previous entry it adds another. Is there a way around this? thanks
  12. Thanks for the reply, This looks like it will work for the monthly values but maybe not for individual weeks, however I will test this and see what outcome i can get. Thanks again for the help
  13. Yes It can change any attribute of the div and even text inside it. I have done this myself but am no expert on javascript I suggest you post in the javascript section of this site.
  14. I think you need something like this: <?php $con = mysql_connect("localhost","apnimusk","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("apnimusk_naat", $con); // check to see if id is set if(isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $GET['id']; echo 'Your have requested ID #'.$id.''; echo '<a href="sadasdas.php">Back[/url]'; $result = mysql_query("SELECT * FROM table2 WHERE id=$id"); while($row = mysql_fetch_array($result)) { echo $row['row1']; echo $row['row2']; } } // no id requested, display results else { $result = mysql_query("SELECT * FROM album WHERE name='Timmy Mellowman'"); while($row = mysql_fetch_array($result)) { echo $row['name'] . " " . "<a href='?id=".$row['id']."'>".$row['age']."[/url]"; echo " "; } } mysql_close($con); ?> but without knowing the structure of your second table I cannot help any further
×
×
  • 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.