<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linked tables &#8211; Blogvaria</title>
	<atom:link href="https://blog.evaria.com/key/linked-tables/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.evaria.com</link>
	<description>The personal pages</description>
	<lastBuildDate>Mon, 14 Mar 2011 11:28:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
<site xmlns="com-wordpress:feed-additions:1">1077093</site>	<item>
		<title>Working with linked tables</title>
		<link>https://blog.evaria.com/2011/working-with-linked-tables/</link>
		
		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Mon, 14 Mar 2011 11:27:28 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[linked tables]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">http://blog.evaria.com/?p=1284</guid>

					<description><![CDATA[I&#8217;m currently working on a website project that requires separate websites (different language dependant domains) to share a common image database. Thus, to avoid having to upload and link in &#8230; ]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m currently working on a website project that requires separate websites (different language dependant domains) to share a common image database. Thus, to avoid having to upload and link in the images for each individual website, I&#8217;ve decided to use data queries that take advantage of linked tables. The only main criteria are to have a common unique ID in order for the queries to work properly and all tables residing in the same database (which requires that you are able to make cross domain queries).</p>
<p>In my case I&#8217;m defining a unique page reference number for each &#8220;product page&#8221;, which obviously is the same for each individual language specific website, and an equal reference number for each image or image group. An example of a query/join statement that could &#8220;grab&#8221; your images could look like:</p>
<pre>SELECT imageDB.filename, imageDB.filepath, websitePages.id
FROM imageDB, websitePages
WHERE imageDB.ref_number = websitePages.ref_number;</pre>
<p>If you for some reason get a syntax error you could rewrite the statement as follows according to the ANSI SQL-92 syntax specification:</p>
<pre>SELECT imageDB.filename, imageDB.filepath, websitePages.id
FROM imageDB INNER JOIN websitePages
ON imageDB.ref_number = websitePages.ref_number;</pre>
<p>Note! The image table is named <strong>imageDB</strong> and the website table  is named <strong>websitePages</strong></p>
<p>The result gives you the name and path for your image related to a specific page/product. Quite useful isn&#8217;t it!?</p>
<p>More simple tips and online tutorials can be found e.g. <a href="http://www.sqlcourse2.com/intro2.html">here</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1284</post-id>	</item>
	</channel>
</rss>
