bh
Members-
Posts
238 -
Joined
-
Last visited
Everything posted by bh
-
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
-
Hi, Glob With glob you can read only directiories, or files and directories, you can filter by names and has many more feature.
-
if (strtotime("-5 day") >= $a_timestamp) { // it was 5 or more days ago }
-
Yap
-
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'))
-
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
-
Hi, comparise the dates with ints (use your strtotime functions to do that)
-
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...
-
Parse error: syntax error, unexpected T_IS_NOT_EQUAL, expecting ',' or ')'
bh replied to cactus's topic in PHP Coding Help
Hi, ??? isset function: http://php.net/manual/en/function.isset.php try isset($_GET['action']) && ($_GET['action'] != "login") -
Hi, try with array_walk_recursive function.
-
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.
-
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?
-
Your select query isnt valid. $sqlSel = mysql_query("SELECT * FROM `putwriter... Whats your putwriter_college.Login table structure?
-
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)
-
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
-
hm, what about this line? you forgot the dollar sign before your variable name. private static default_config
-
Hi, So you cannot assign an array to a class const.
-
Hi, your variable name is wrong: (you forgot an "s", results) $num_results = $results->num_rows;
-
Correct syntax for echoing variables with values!
bh replied to wright67uk's topic in PHP Coding Help
Hi, list function is your friend: while(list($firstmail, $secondmail, $thirdmail)=mysql_fetch_row($query)){echo "{$firstmail}, {$secondmail}, {$thirdmail}<br>";} -
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)
-
Post us the "DoEvents(...);" function call. Your parameter ($this) might be not an object...
-
add auto_increment to a row when table is already created
bh replied to futrose's topic in MySQL Help
You have to modify the column: ALTER TABLE table_name MODIFY COLUMN column_name INT AUTO_INCREMENT; -
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.
-
Hi, google? anyway here two of millions: jpgraph graphpite