![]() ![]() |
| Mindapolis |
Apr 11 2012, 08:04 PM
Post
#1
|
|
Member ![]() ![]() ![]() Group: Members Posts: 67 Joined: 2-April 11 Member No.: 14,256 |
In mysql is there a way to save a query?
|
| Frederiek |
Apr 12 2012, 01:41 AM
Post
#2
|
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,539 Joined: 23-August 06 From: Europe Member No.: 9 |
What do you mean by "save"? Insert, save to file, export, ...?
-------------------- "The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French) "Leave scepticism to others and take action" from HOME by Goodplanet An inconvenient truth by Al Gore |
| Mindapolis |
Apr 12 2012, 08:19 AM
Post
#3
|
|
Member ![]() ![]() ![]() Group: Members Posts: 67 Joined: 2-April 11 Member No.: 14,256 |
Save, as in you could run the query daily.
|
| Brian Chandler |
Apr 12 2012, 08:23 AM
Post
#4
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,129 Joined: 31-August 06 Member No.: 43 |
If the query is 'Q', simply run a program every day (see 'cron') that includes:
mysql_query('Q'); (The answer to your original question is strictly "Yes", because you can make a table with a column 'query' and save queries in it. But it's not clear what use this would actually be.) -------------------- Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged. |
| Mindapolis |
Apr 12 2012, 09:59 AM
Post
#5
|
|
Member ![]() ![]() ![]() Group: Members Posts: 67 Joined: 2-April 11 Member No.: 14,256 |
I'm sorry, I'm relatively new to databases. I didn't know you could save queries in a table.
|
| Brian Chandler |
Apr 12 2012, 10:09 AM
Post
#6
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,129 Joined: 31-August 06 Member No.: 43 |
QUOTE I'm sorry, I'm relatively new to databases. I didn't know you could save queries in a table. Well, you can save strings in a database table, and queries are strings, therefore (provided you escape them properly) you can save queries in DB tables. -------------------- Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged. |
| Darin McGrew |
Apr 12 2012, 10:59 AM
Post
#7
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,851 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Or did you mean parameterized statements?
-------------------- Darin McGrew
WDG Member since 1998 |
| Brian Chandler |
Apr 12 2012, 12:53 PM
Post
#8
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,129 Joined: 31-August 06 Member No.: 43 |
QUOTE Or did you mean parameterized statements? What difference would it make? Are not parameterized statements represented by strings? (There's the obvious problem of how to pass the parameters, but the question is so up in the air my head is spinning.) -------------------- Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged. |
| Darin McGrew |
Apr 12 2012, 07:52 PM
Post
#9
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,851 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I'm just guessing at what the OP might have meant by "save a query"...
-------------------- Darin McGrew
WDG Member since 1998 |
| Frederiek |
Apr 13 2012, 01:45 AM
Post
#10
|
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,539 Joined: 23-August 06 From: Europe Member No.: 9 |
I'm sorry, I'm relatively new to databases. I didn't know you could save queries in a table. Then you should take a look at http://devzone.zend.com/6/php-101--php-for...olute-beginner/ , where there's also a chapter on databases (part 8). -------------------- "The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French) "Leave scepticism to others and take action" from HOME by Goodplanet An inconvenient truth by Al Gore |
| Mindapolis |
Apr 13 2012, 01:49 PM
Post
#11
|
|
Member ![]() ![]() ![]() Group: Members Posts: 67 Joined: 2-April 11 Member No.: 14,256 |
Thank you so much for the advice
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 08:55 AM |