Browse code

General simple-ification

Jaidyn Lev authored on 2018-06-14 04:18:22
Showing 1 changed files
... ...
@@ -9,20 +9,25 @@
9 9
 
10 10
 
11 11
 (defun fetch (table query)
12
-  "Fetches a set query from a table."
12
+  "Fetch a set query from a table."
13 13
 
14
-  (cl-mysql:query
15
-  (concatenate `string
16
-               "select " query " from " table)))
14
+  (car
15
+    (car
16
+      (cl-mysql:query
17
+        (concatenate `string
18
+                     "select " query " from " table)))))
17 19
 
18 20
 
19
-(defun fetch-where (table variable value query)
20
-  "Fetches a specific row-- using 'where variable == value' to select the row.
21
+(defun fetch-where (table variable value)
22
+  "Fetch specific row(s)-- using 'where variable == value' to select the row.
21 23
   Returns the query."
22 24
 
23
-  (cl-mysql:query
24
-  (concatenate `string
25
-	"select " query " from " table " where " variable "=" value ";")))
25
+  (car
26
+    (car
27
+        (cl-mysql:query
28
+          (concatenate `string
29
+                       "select * from " table
30
+                       " where " variable "=" value ";")))))
26 31
 
27 32
 
28 33
 (defun insert-row (table &rest values)