Asked  7 Months ago    Answers:  5   Viewed   27 times

I need to get rows from the database where the records are of one month. I tried this SELECT:

$result = mysql_query("SELECT * FROM my_table WHERE DATEPART('month', date_column)=11");

In database is a lot of rows that have a date in the 11. month, but i do not get any results. Can anyone help me? Thank!



There is no DATEPART function in MySQL. Use MONTH(date_column) or EXTRACT(MONTH FROM date_column) instead.

Wednesday, March 31, 2021
answered 7 Months ago

From the PHP Manual on mysqli_stmt::execute:

mysqli_stmt::execute -- mysqli_stmt_executeExecutes a prepared Query

Returns TRUE on success or FALSE on failure.

if ($stmt->execute()) { // exactly like this!
    $success = true;

You're doing it right... What's your dilemma?

Wednesday, March 31, 2021
answered 7 Months ago

This is a FAQ for InnoDB tables. See the explanation at

Saturday, May 29, 2021
answered 5 Months ago

Set the UITableView property allowsSelectionDuringEditing to YES.

Friday, September 10, 2021
answered 2 Months ago

The rowSums function can be used here:


How it works: !RRR is a matrix with TRUE at any zero. In the general case, you can replace !RRR with whatever logical condition you want to check. For example, to see if any element is equal to 3, you could take the rowSums of RRR==3.

I think rowSums(test(x))>0 is essentially the same as apply(RRR,1,function(x)any(!test(x))); both coerce the object to a matrix. I find the rowSums version easier to read and think I've heard people praise its efficiency.

For columns, similarly:

RRR[, colSums(!RRR)>0, with=FALSE]
Sunday, October 17, 2021
answered 1 Week ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :