Jump to content

bh

Members
  • Posts

    238
  • Joined

  • Last visited

Everything posted by bh

  1. Hi, you've done a commit, so your commands executes and uploaded into your db. If you want to rollback your exec doesnt call commit before rollback. $mysqli->autocommit(FALSE); // these command will be rollbacked $mysqli->rollback(); use exception to handle an elegant way to commit/rollback
  2. Hi, Glob With glob you can read only directiories, or files and directories, you can filter by names and has many more feature.
  3. Hi, try SimpleXML
  4. if (strtotime("-5 day") >= $a_timestamp) { // it was 5 or more days ago }
  5. Hi, strtotime("-5 day") gives you in timestamp the date that was 5 days ago Update: as mktime(0, 0, 0, date('m'), date('d')-5, date('Y'))
  6. Hi, i suggest you to use PHPMailer Update: But swiftMailer also a good choice or even better - http://forums.phplist.com/viewtopic.php?t=8270
  7. Hi, comparise the dates with ints (use your strtotime functions to do that)
  8. Hi, try to use the isset function to check the index is defined or not! Are you sure the 'action' index is always exists? Debug your code with print_r($_GET) to check indexes...
  9. Hi, ??? isset function: http://php.net/manual/en/function.isset.php try isset($_GET['action']) && ($_GET['action'] != "login")
  10. Hi, try with array_walk_recursive function.
  11. Hi, with file_get_contents you load the entiry file into the memory. If you want to load only a part of the file you can use fgets or fread for reading. For positioning in the file use: fseek.
  12. Your query structure is ok, it might be one of the variables in the query... $user = mysql_real_escape_string($_POST['user']); $pass = mysql_real_escape_string($_POST['password']); var_dump($user); var_dump($pass); Debug a bit, lets see the variables content... Both are string?
  13. Your select query isnt valid. $sqlSel = mysql_query("SELECT * FROM `putwriter... Whats your putwriter_college.Login table structure?
  14. while($state = mysql_fetch_assoc($get_state)) { $location_array[] = $state['id']; $i++; } $get_buildings = mysql_query("SELECT * FROM points WHERE location_id IN (".implode(",", $location_array).") ORDER BY name ASC") or die(mysql_error()); Hows that? Update: Anyway its much better than you do your stuff in one query (with JOIN)
  15. Hi, becouse you use mysql_fetch_array your $row value has numerical indexes, its not an associative array. So you have $row[0], $row[1] but not $row['to'], $row['from'] use instead mysql_fetch_assoc
  16. hm, what about this line? you forgot the dollar sign before your variable name. private static default_config
  17. Hi, So you cannot assign an array to a class const.
  18. Hi, your variable name is wrong: (you forgot an "s", results) $num_results = $results->num_rows;
  19. Hi, list function is your friend: while(list($firstmail, $secondmail, $thirdmail)=mysql_fetch_row($query)){echo "{$firstmail}, {$secondmail}, {$thirdmail}<br>";}
  20. Hi, first count the rows where type != 'c' (or if you want to more expects use "not in"), and after this method check whether type = 'c' row is exist or not... (in one query i think it would more expensive)
  21. bh

    $this

    Post us the "DoEvents(...);" function call. Your parameter ($this) might be not an object...
  22. You have to modify the column: ALTER TABLE table_name MODIFY COLUMN column_name INT AUTO_INCREMENT;
  23. Hi, if your table type is MyIsam you can use FULLTEXT index search. If its an InnoDB you can use prefixed index on your text column. Example you create a 20 character length index.
  24. Hi, google? anyway here two of millions: jpgraph graphpite
×
×
  • 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.