You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							13 lines
						
					
					
						
							403 B
						
					
					
				
			
		
		
	
	
							13 lines
						
					
					
						
							403 B
						
					
					
				| /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
 | |
| const pool = require("./connect");
 | |
| import {QueryError} from 'mysql2';
 | |
| 
 | |
| interface definitionInterface{
 | |
|     (message:string):void;
 | |
| }
 | |
| export default function Select(sql: string, callback: definitionInterface) {
 | |
|     pool.query(sql, (err: QueryError, rows: string) => {
 | |
|         callback(rows);
 | |
|         pool.releaseConnection(pool);
 | |
| });
 | |
| } |