Jump to content

me1000

Members
  • Posts

    183
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

me1000's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. actually that was a typo... however the "$this->" fixed it... Like I said, I figured it was a stupid mistake like that! I appreciate the assistance. Thank You,
  2. I feel like an idiot for asking this, but I need some help... I have a simple 2D array, $oObj->specailPageList = array( 'login' => 'login.php' ); Now I want to get the value of row... (in this case I want "login.php") to be returned... I just cant turn anything up! echo $oObj->specailPageList["login"]; Thanks,
  3. While it is not specifically a PHP editor Coda by Panic Software is the best editor I have ever used! I really cant even say enough about it!
  4. So this will only work if I use PHP generated dates? this could be a problem, because the date will be stored in the database, and pulled out when it needs to be calculated. EDIT: im just going to mark this topic as solved, because for the moment I can just do the math on the dates before they get stored in the DB...
  5. ok, So when I attempt to work with this, im not having a lot of luck echo date("2008-05-26", strtotime('+1 year')); from what I understand this should return "2009-05-26" right? Im getting the exact same date as I entered into it... "2008-05-26" im not sure what the problem is here though...
  6. ok thank you, I believe that was the function I was looking for.
  7. ok, so basically im out of luck making it any easier on me. At first it doesnt seem that hard, however the more I think about it, what if in those 7 days the month changes? I have to write that into my code. Now what happens if the year also changes within that 7 days too? is there no easy(er) way to manage this?
  8. I have a LAMP server, but I use MAMP for development, kind of depressed that you dont include MAMP as an option though...
  9. You are going about it in the wrong order... (without looking at any of your code) you need to upload the image before you do anything to it. Then you can resize and rename it on the server.
  10. Hello, The user will have the ability to determine the expiration period of an entry. (1 week, 2 weeks, 1 month, 2 months, 3 months, 6 months) The problem is I am unsure of how to filter the results to only show the entries that are not past the expiration. Is there an easy SQL or PHP command to convert dates to make them much easier to work with? Thanks,
  11. ok, So The user will be able to remove an entry from the database, however once they do it needs to update the rest of the entries... for example, there is an 'ORDER' column in the DB if there are 3 entries in the DB the order column would be filled out like so, '1,2'3' respectivly. however If I wanted to remove the row WHERE ORDER=1 the database will have the values to '2,3' instead it needs to update all the values that are greater than 1 and subtract 1 from them, so after you delete the row the db would be updated so that it said '1,2' again. Here is the PART script I have written so far.. $inPageID = (is_numeric($_REQUEST['id'])) ? $_REQUEST['id'] : die('invalid id'); $query = "SELECT * FROM nav WHERE ASSO=$inPageID"; $result = mysql_query($query); $blah = mysql_fetch_array($result); $newnum = $blah['ORDER']; $query = "SELECT * FROM nav WHERE `ORDER` > $newnum"; $count = mysql_num_rows(mysql_query($query)); //echo $count; //echo $query; //die; if ($count > 0) { $result = mysql_query($query); while ($blah123 = mysql_fetch_array($result)){ $newnum2 = $blah123['ORDER'] - 1; $query = "UPDATE nav SET `ORDER`='$newnum2' WHERE `ID`='".$blah123['ID']."'"; $result = mysql_query($query); $message = ($result) ? "" : 'FAIL!'; echo $message; //echo $query; } } The error im getting is... Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path...] on line 69 line 69 is while ($blah123 = mysql_fetch_array($result)){ I believe it updates the first row after that, but then it fails when it tries to loop again. Can anyone help me? Thanks,
  12. That was it, Just curious: why I couldnt run the mysql_query() function inside of the _fetch_array() function? Thank you
  13. So basically my while loops will never stop... on top of that it looks like my query (only when ran from the browser via this script) will only return one entry. here is the loop $query="SELECT * FROM nav ORDER BY 'ORDER' ASC"; //echo $query; while ($row = mysql_fetch_array(mysql_query($query))) { echo '<div class="navBullet"><a href="http://google.com">'.$row['ASSO'].'</a></div>'; } im sure it is just something stupid that im doing, but I cant seem to find it. I know the query is good, because I have ran it through my sql manager, and it returned the correct entries.
  14. nope it doesnt, it is basically what I already posted; I just forgot to add the last ) at the end when i removed a good portion of the array. EDIT: nevermind, I think the problem was that the table wasnt long enough. so the library I am using to create the pdf just hides it.
  15. array_push($arrayAlpha,array('Name'=>$Row['name']." ".$Row['name']); That isnt all the code but it is what is causing the problem, any time I add a 2nd $Row variable it causing nothing to display. As long as there is only one (regardless of which one it is, for example it could be $Row['id'] or $Row['content'] ) it displays fine, the code I posted above is calling the same variable $Row['name'] however it doesnt display, but if I used array_push($arrayAlpha,array('Name'=>$Row['name']." "); it would work, even with the space after it. Any ideas how to fix this?
×
×
  • 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.