473,587 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

348 Contributor
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 1094
pbmods
5,821 Recognized Expert Expert
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 Contributor
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
1679
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 buttons. I need one of the buttons to simply be a back button. I have this button working fine. I need the second and fourth buttons to point to the...
4
3391
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. For example, no matter where the user is on my web site, if he clicks on the FRENCH button at the top, he will be moved from: ...
6
8895
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? I am running UDB 8.2 on Linux and AIX. Thanks.
2
3100
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 connecting the two shapes. http://www.blackwaterbadgers.co.uk/image1.bmp Image 1 shows how if you have a line between two shapes, the line is...
2
1456
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 database. All on the same page. Could someone tell me what is wrong with my code? The page is here http://www.picmonkey.com/MoreGraphics.php
8
11150
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 user", with limited permissions. Basically there are locations on the network where they can only read and execute files, but no way to write. ...
14
1999
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 some code in the FormLoad procedure which works out the centre of the screen and moves the child appropraitely. This is pretty much the code I...
7
4149
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 location away from where it is? I'd like to either 1). Move STMMLOG without moving db2diag 2). Prohibit the making of the stmm.1.log file(s).
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.