473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Moving my SQL to different location other than in my script.

348 100+
I would like to move several sql statements outside of my php script but have yet to be successful.

I moved the sql to a different location/directory then tried to call the sql with an include tag within the php but it doesn't work.

The reason I want to move the sql away from the php script is to make it more readable. My sql view is ove 20 lines. I also need to add about 5 more views into this php script.

Thanks.

Frank
Jun 9 '07 #1
2 1081
pbmods
5,821 Expert 4TB
Your views are over 20 lines, or your queries are over 20 lines?

http://www.thescripts.com/forum/thread642508.html
Jun 9 '07 #2
fjm
348 100+
Your views are over 20 lines, or your queries are over 20 lines?

http://www.thescripts.com/forum/thread642508.html
pbmods, it was actually the query. My views are as simple as select * from view_tbl.

I forgot to create the view. :blush:

Thanks for that link. That is a good read for sure.

Let me ask you this, is there any way that I can update my base tables through a view? What I have are 14 tables I am joining through this view. I know that mysql supports updatable views but I can't seem to get the views to update. I just get an error saying that the view cannot update the base tables.

I am using mysql 5.0.27.

I am going to read the link you provided also to see if I can find the answer in there.
Jun 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JR | last post by:
Hi. I have a CGI script that will need to call itself an unknown number of times, to add rows, run queries, etc. At the bottom of the output that is produced by the script, there are four...
4
by: Normand Peladeau | last post by:
I would like to create a link on a web page that will call a script and jump to an URL similar but slightly different than the current one. I am doing this to allow people to switch languages. ...
6
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? ...
2
by: Carl Gilbert | last post by:
Hi I have a math kinda problem where I'm trying to split some lines when two or more lines connect two shapes. The reason I am doing this is to make it clear that there are multiple lines...
2
by: ameshkin | last post by:
I'm having all kinds of visual problems using dreamweaver's built in query builder. I have 4 different categories. Right. I want to show ten records from each category of items in a mysql...
8
by: Bernard Lebel | last post by:
Hello, I would like to know if there is a way to run a Python file under a different user account than the one logged in. Allow me to explain. There are a bunch of people here, they are "basic...
14
by: bwadley | last post by:
Hi, Im fairly new to VB.NET and am hoping someone can help me with what is probably a simple problem. I have an MDI app, when I open a child form, I want it centered to the parent. So I put...
7
by: bwmiller16 | last post by:
Folks - DB2 V9.2 on SUSE 9 Is there a way other than moving the entire /sqllib/db2dump/ (Default database path (DFTDBPATH) = /home/db2inst1 to move just STMMLOG out of there to another...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.