<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Find/Replace query' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Find/Replace query' posted on the 'MySQL' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 22:21:02 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 22:21:02 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Find/Replace query</title>
      <link>http://www.programmersheaven.com/mb/mysql/413703/413703/findreplace-query/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
These are the dreaded words; I'm a newbie to SQL.&lt;br /&gt;
&lt;br /&gt;
I'm developing a business directory, and I need to import data from my existing database into the new one.&lt;br /&gt;
&lt;br /&gt;
I need to import some data from one table to another in MYSQL before exporting it as CSV, and importing it to the new database.&lt;br /&gt;
&lt;br /&gt;
In one table, the categories table, there are two fields, "ID" and "Category Name".&lt;br /&gt;
&lt;br /&gt;
In the "listings" table, there are all the usual fields (username, password etc) and then "Type", which corresponds to the category ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What I would like to be able to do is something like this;&lt;br /&gt;
&lt;br /&gt;
1) Search the field "type" in the listings table&lt;br /&gt;
2) Get the number from that field&lt;br /&gt;
3) If the number from that field matches the number in "id", in the categories table, Populate the "type" field with the corresponding text from "Category Name"&lt;br /&gt;
4) Save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is this possible to do in a SQL query, or with PHP? I'd love to find out, I hope someone out there can help me!&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Xander&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mysql/413703/413703/findreplace-query/</guid>
      <pubDate>Sat, 20 Feb 2010 06:20:58 -0700</pubDate>
      <category>MySQL</category>
    </item>
    <item>
      <title>Re: Find/Replace query</title>
      <link>http://www.programmersheaven.com/mb/mysql/413703/413824/re-findreplace-query/#413824</link>
      <description>It is possible to do in SQL Query&lt;br /&gt;
&amp;lt;a href="http://www.essayacademia.com&amp;gt;Essays &amp;amp; Dissertations Qualified&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;a href="http://web.usca.edu/"&amp;gt;South Carolina University&amp;lt;/a&amp;gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/mysql/413703/413824/re-findreplace-query/#413824</guid>
      <pubDate>Wed, 24 Feb 2010 03:34:49 -0700</pubDate>
      <category>MySQL</category>
    </item>
  </channel>
</rss>
