Jump to content

lalabored

Members
  • Posts

    48
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lalabored's Achievements

Member

Member (2/5)

0

Reputation

  1. I want to be able to replace [user: someperson] with a link that goes to the someperson's profile but I have no idea where to start...
  2. I need a function that is able to evaluate a string. For example, I have $var = "3+4*5", is there a function that can be like function($var) = answer?? It has to be able to recognize that 4*5 is done first.
  3. If I have a number like this... 1.67785581773E+12 is there a function to change it back to the way it was before as a normal number without the E or just make me able to enter it into MySql without the E...
  4. I don't understand... so you want the username that's returned from your query to be passed onto another page? You should use sessions for that. Go on Google and look for tutorials, good luck!
  5. Make a variable for the table row background colour and every time your mysql database spits out another row, you set the colour to something else, for example... $colour = "dodgerblue"; //Sorry, too lazy to find the hex code... while($row = mysql_fetch_array($rs)){ echo "<tr><td bgcolor='$colour'>$row</td.</tr>"; if($colour == "dodgerblue"){ $colour = "skyblue"; //Don't know if that's a real colour xD }else{ $colour = "dodgerblue"; } }
  6. I have a membership system and I want to implement time zones so that users can choose their own time zones and the times in my database will be different for users of different time zones. How would I do this? Please help! Thanks!
  7. Make a form with a input button that calls an AJAX function using onclick function. Then in the AJAX function, use the .open("GET", "php_file_name" + input_fields, true); and .send(null); to call a php file which would do that. You have to obviously pass the info from the forms into a PHP file's address so it can get the data. Then use php to do the rest. I don't see why you didn't just go with straight forward PHP. ??? After PHP gets the data, how could I put the data in such a way in the responsetext so that I can use javascript to insert a new row into my table? I am inserting data into a form, that form uses ajax to insert data into a database and then I need it to return the new data inserted in a formatted form and then insert it as a new row in the table that's already on the page without refreshing the page.
  8. I have information in the form of name, details and date due in my database. How can I retrieve the data from the database as ajax response text and insert it as a new row in a table with a column for name, details and date due?
  9. Nevermind... I figured it out, I never knew you were able to compare dates using the greater than and less than signs ^^;;
  10. I need a query that deletes rows with dates that have already passed. I'm storing dates in the future in my MySql database and I want the rows to be deleted when those dates have passed, how so I make a query that does that? I tried this... DELETE FROM mytable WHERE TIME_TO_SEC(SUBTIME(release_date,NOW())) <= 0 But it doesn't work so now I'm stuck, please help me.
  11. But how would I compare something made from date() to a MySql date that's like this "0000-00-00 00:00:00"?
  12. That didn't work =S I tried using this... $old = mktime(0, 0, 0, date("m"), date("d")-1, date("Y")); $q = "SELECT * FROM `p_messages_sent` WHERE UNIX_TIMESTAMP(sentdate) < $old"; $rs = mysql_query($q); ..to get rows that were older than 1 day (because I didn't have anything older than 30 days) but that didn't work =\
  13. I have a MySql table with the field "sentdate". How could I set up a query that selects only entries that have a sentdate that is for example 30 days old?
×
×
  • 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.