MCPcopy Create free account
hub / github.com/MariaDB/server / print_table_data_html

Function print_table_data_html

client/mysql.cc:4234–4274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4232
4233
4234static void print_table_data_html(MYSQL_RES *result)
4235{
4236 MYSQL_ROW cur;
4237 MYSQL_FIELD *field;
4238
4239 mysql_field_seek(result,0);
4240 (void) tee_fputs("<TABLE BORDER=1>", PAGER);
4241 if (column_names)
4242 {
4243 (void) tee_fputs("<TR>", PAGER);
4244 while((field = mysql_fetch_field(result)))
4245 {
4246 tee_fputs("<TH>", PAGER);
4247 if (field->name && field->name[0])
4248 xmlencode_print(field->name, field->name_length);
4249 else
4250 tee_fputs(field->name ? " &nbsp; " : "NULL", PAGER);
4251 tee_fputs("</TH>", PAGER);
4252 }
4253 (void) tee_fputs("</TR>", PAGER);
4254 }
4255 while ((cur = fetch_row(result)))
4256 {
4257 if (interrupted_query)
4258 break;
4259 ulong *lengths=mysql_fetch_lengths(result);
4260 field= mysql_fetch_fields(result);
4261 (void) tee_fputs("<TR>", PAGER);
4262 for (uint i=0; i < mysql_num_fields(result); i++)
4263 {
4264 (void) tee_fputs("<TD>", PAGER);
4265 if (opt_binhex && is_binary_field(&field[i]))
4266 print_as_hex(PAGER, cur[i], lengths[i], lengths[i]);
4267 else
4268 xmlencode_print(cur[i], lengths[i]);
4269 (void) tee_fputs("</TD>", PAGER);
4270 }
4271 (void) tee_fputs("</TR>", PAGER);
4272 }
4273 (void) tee_fputs("</TABLE>", PAGER);
4274}
4275
4276
4277static void

Callers 1

com_goFunction · 0.85

Calls 7

mysql_field_seekFunction · 0.85
tee_fputsFunction · 0.85
xmlencode_printFunction · 0.85
fetch_rowFunction · 0.85
mysql_num_fieldsFunction · 0.85
is_binary_fieldFunction · 0.85
print_as_hexFunction · 0.85

Tested by

no test coverage detected