How do you get the number of rows affected by query?

If you are using php,

/* assuming your query returns to $result

$numRows = mysql_num_rows($result);

There is an online manual for php...

If at the command line, it is returned at the end of the query output

Or in mysql, you can select count(*) as the only thing returned by your query, with your usual conditions (WHERE, etc) after it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.