小编Kir*_*rti的帖子

如何获取3个月的数据,不包括每个月的周末数据

Select temp, DATE_FORMAT(temp,'%b-%d') from test
where temp between
    concat(year(now()),'-',month(now()) -3,'-', DATE_FORMAT(now(), '%d'))
        and
    (curdate());
Run Code Online (Sandbox Code Playgroud)

我正在使用此查询获取3个月的数据,包括每周7天,但我没有按预期获得结果,如何通过此查询获取每周5天的数据并忽略数据库中的周末数据.

mysql sql mysql-workbench

3
推荐指数
1
解决办法
107
查看次数

如何使用React Native包tcomb-form-native进行验证

在TextInput中输入电子邮件时,它应根据输入的电子邮件是否有效来验证并显示错误消息?我正在使用tcomb表单验证.如何以tcomb形式添加电子邮件验证?下面是代码.

import React, { Component } from 'react';
import {
  AppRegistry,
  Text,
  Image,
  View,
  Button,
  StyleSheet,
  TextInput,
  Linking,
  Alert,
  Navigator
} from 'react-native';
import t from 'tcomb-form-native';

const Form = t.form.Form;

// here we are: define your domain model
const LoginFields = t.struct({
  username: t.String,              // a required string
  password: t.String,   // a required string
});

const options = {
  fields: {
    password: {
      type: 'password',
      placeholder: 'Password',

    },
    username: {
      placeholder: 'e.g: abc@gmail.com',
      error: 'Insert a valid email'
    } …
Run Code Online (Sandbox Code Playgroud)

react-native

-1
推荐指数
1
解决办法
3123
查看次数

标签 统计

mysql ×1

mysql-workbench ×1

react-native ×1

sql ×1