Dev Shed Forums http://forums.devshed.com/ Dev Shed - Open Source web development forums. Topics covered include PHP, Apache, mySQL, Zope, Jserv, Java, Python, Zend, XML, DHTML, Javascript and more. en Wed, 22 May 2019 08:04:47 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums http://forums.devshed.com/ <![CDATA[[MilesWeb] Get 50% OFF on SSD Web Hosting | Free SSL & Site Builder, Migration]]> http://forums.devshed.com/web-hosting-offers/981515-milesweb-50-ssd-web-hosting-free-ssl-site-builder-migration-new-post.html Wed, 22 May 2019 07:58:06 GMT *MilesWeb* (https://www.milesweb.in) is a world-class hosting provider that provides web hosting solutions of all types. We make sure your website is fast, secure and always up, so that you stay focused on what you do best. We offer everything that you need to build, host and manage a website. Our top priority is to provide the best website hosting experience to our clients at an affordable cost.... MilesWeb is a world-class hosting provider that provides web hosting solutions of all types. We make sure your website is fast, secure and always up, so that you stay focused on what you do best. We offer everything that you need to build, host and manage a website. Our top priority is to provide the best website hosting experience to our clients at an affordable cost. No contracts or hidden fees. We even offer a 30 day money back guarantee. Choose the best web hosting plan for your website.

Quote:

Save 50% on Cheap and Unlimited web hosting plans. Enter promo code SUNSHINE during checkout. Renewal would be at regular price.
Web Hosting Server Locations:

  • India
  • US
  • UK


Below is the list of Unlimited SSD Hosting plans:

Economy Plan

  • Host 1 Domain
  • 1GB SSD Space
  • Unlimited Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • 3 SQL DB's
  • 10 Email Accounts

Discounted Price: $0.93 /mo - Buy Now

Value Plan

  • Host 1 Domain
  • Lifetime Free Domain
  • Unlimited SSD Space
  • Unlimited Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • Unlimited SQL DB's
  • Unlimited Email Accounts

Discounted Price : $2.12 /mo - Buy Now

Unlimited Plan

  • Host Unlimited Domains
  • Lifetime Free Domain
  • Unlimited SSD Space
  • Unlimited Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • Unlimited SQL DB's
  • Unlimited Email Accounts

Discounted Price: $3.57 /mo - Buy Now

For more details on Unlimited Web Hosting plans visit : https://www.milesweb.in/hosting/web-hosting

Below is the list of Shared SSD Hosting plans:

Lite Plan

  • Host 1 Website
  • 1GB SSD Space
  • 10 GB Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • 1 SQL DB's
  • 2 Email Accounts

Discounted Price: $0.70 /mo - Buy Now

Deluxe Plan

  • Host 3 Websites
  • 5 GB SSD Space
  • 50 GB Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • 5 SQL DB's
  • 10 Email Accounts

Discounted Price: $2.50 /mo - Buy Now

Ultimate Plan

  • Host 5 Websites
  • 10 GB SSD Space
  • 100 GB Bandwidth
  • Free SSL Certificate
  • cPanel + Softaculous
  • 10 SQL DB's
  • 20 Email Accounts

Discounted Price: $3.00 /mo - Buy Now

For more details on Shared Hosting plans visit : https://www.milesweb.in/hosting/shared-hosting

Quote:

The domain will be FREE till the time your web hosting account remains active with us.
Also check our Windows hosting plans at : https://www.milesweb.in/hosting/windows-hosting

Are you looking for a secure and reliable business web hosting plan? Then you are at the right place. MilesWeb has launched one stop cloud based hosting solution for eCommerce, high traffic and growing business websites. Yes! Hosting & security bind together in one package.

Quote:

Save 50% on business hosting plan. Use promo code NY50 during checkout.
Why Choose MilesWeb's Cloud-Based Business Hosting?

  • Cloud Infrastructure
  • Website Backup in Cloud
  • Cloud Based Web Security
  • Email Spam Protection

Business Hosting Plan

  • Host 1 Website
  • Unlimited SSD Web Space
  • Unlimited Bandwidth
  • 4 CPU & 4 GB RAM
  • Secure IMAP/POP3 E-mail Accounts
  • Standard SSL Certificate
  • cPanel & 1-Click Script Installs
  • Free Website Transfer Service
  • WP-CLI & Git
  • On-Demand Backup & Restore

Discounted Price : $19.50 /mo - Buy Now

For more details on Business Hosting plan please visit : https://www.milesweb.in/hosting/business-hosting

Below is the list of Add-ons provided with plans:

SSL Certificate

  • Comodo Domain SSL - $11 /yr
  • Let's Encrypt SSL - Free

Website Backup Service

  • Lite Plan : $3 /yr
  • Deluxe Plan : $5 /yr
  • Ultimate Plan : $9 /yr
  • Economy Plan : $3 /yr
  • Value Plan : $1 /mo
  • Unlimited Plan : $2 /mo

HackAlert Monitoring : Annually $15

  • HackAlert is a monitoring service that checks your website daily and immediately notifies you if your website has been hacked or injected with malicious code.

Sitelock Basic : Annually $25

  • Get Total Website Security, protect your website with monthly malware scans and guard against hacker attacks, identity theft and other threats. Trust Seals and Daily Security Scanning of upto 25 pages. Exclusive registration price!

Quote:

SpamExperts: The Best Solution Against Spam And Viruses For Your Organization! Protect unlimited mailboxes from spam emails for just $3 /mo.
For Immediate Assistance, Contact us : sales[@]milesweb[.]com or visit our website to initiate live chat. ]]>
Web Hosting Offers MilesWeb http://forums.devshed.com/web-hosting-offers-100/milesweb-50-ssd-web-hosting-free-ssl-site-builder-migration-981515.html
How I can validate input field in Webservice in Asp.net C#? http://forums.devshed.com/beginner-programming/981514-validate-input-field-webservice-asp-net-new-post.html Wed, 22 May 2019 04:38:57 GMT I'm writing a Web service in Asp.net C#, i need to validate field in web service itself, how i can do that? i have given small example below


public class Pack{
public double Weight { get; set; }
public double Height { get; set; }
}

[WebMethod]
public string CreateShip(Pack pk){

List<Ship> Sh = new List<Ship>();
sh.weight=pk.Weight;

}


Here List coming from third party api, I'm assigning weight to third party weight property but in third party they only accept 50kg, so while assigning i need to check weight in web service how i can do that? ]]>
Beginner Programming Rushabh Verma http://forums.devshed.com/beginner-programming-16/validate-input-field-webservice-asp-net-981514.html
<![CDATA[BUY VPS. USA/Netherlands/Ukraine. SSD VPS. WINDOWS VPS. [Ext]]> http://forums.devshed.com/web-hosting-offers/981511-buy-vps-usa-netherlands-ukraine-ssd-vps-windows-vps-ext-new-post.html Mon, 20 May 2019 19:07:12 GMT Our regular tariffs for SSD VPS in the best data centers of Ukraine, Netherlands and USA: SSD-VPS-2 (Linux only)/1x Xeon 64bit/2 GB RAM/40 GB SSD/ - $6 USD SSD-VPS-3 (Linux only)/1x Xeon 64bit/3 GB RAM/60 GB SSD/ - $9 USD SSD-VPS-4/1x Xeon 64bit/4 GB RAM/90 GB SSD – $12 USD SSD-VPS-6/2x Xeon 64bit/6 GB RAM/100 GB SSD –$16 USD SSD-VPS-8/2x Xeon 64bit/8 GB RAM/150 GB SSD – $24 USD... Our regular tariffs for SSD VPS in the best data centers of Ukraine, Netherlands and USA:

SSD-VPS-2 (Linux only)/1x Xeon 64bit/2 GB RAM/40 GB SSD/ - $6 USD
SSD-VPS-3 (Linux only)/1x Xeon 64bit/3 GB RAM/60 GB SSD/ - $9 USD
SSD-VPS-4/1x Xeon 64bit/4 GB RAM/90 GB SSD – $12 USD
SSD-VPS-6/2x Xeon 64bit/6 GB RAM/100 GB SSD –$16 USD
SSD-VPS-8/2x Xeon 64bit/8 GB RAM/150 GB SSD – $24 USD
SSD-VPS-16/4x Xeon 64bit/16 GB RAM/250 GB SSD – $48 USD


You can also order HDD VPS in Ukraine or Netherlands:

Linux & FreeBSD only/ 1x Xeon 64bit/ 1GB RAM / 25 GB HDD/1 Gbit/s share / 2 TB - $8
STORAGE VPS 100GB/ 1x Xeon 64bit/ 1GB RAM/ 100 GB HDD/1 Gbit/s shared/ 2 TB - $10
STORAGE VPS 200GB/ 1x Xeon 64bit/ 2GB RAM/ 200 GB HDD/1 Gbit/s shared/ 2 TB - $15
STORAGE VPS 300GB/ 1x Xeon 64bit/ 3GB RAM/ 300 GB HDD/1 Gbit/s shared/ 2 TB - $20
STORAGE VPS 400GB/ 1x Xeon 64bit/ 4GB RAM/ 400 GB HDD/1 Gbit/s shared/ 2 TB - $25
STORAGE VPS 600GB/ 2x Xeon 64bit/ 6GB RAM/ 600 GB HDD/1 Gbit/s shared/ 2 TB - $35
STORAGE VPS 800GB/ 2x Xeon 64bit/ 8GB RAM/ 800 GB HDD/1 Gbit/s shared/ 2 TB - $45

Extra IPv4 are also available for 1 $!

Order VPS at our web-site: 301 Moved Permanently ]]>
Web Hosting Offers Deltahost http://forums.devshed.com/web-hosting-offers-100/buy-vps-usa-netherlands-ukraine-ssd-vps-windows-vps-ext-981511.html
HostForLIFE.eu - Limited SALE 15% OFF: Cheap, Best ASP.NET Core 2.2.3 Hosting http://forums.devshed.com/web-hosting-offers/981510-hostforlife-eu-limited-sale-15-cheap-asp-net-core-2-2-3-hosting-new-post.html Mon, 20 May 2019 07:40:49 GMT HostForLIFE.eu - Limited SALE 15% OFF: Cheap, Best ASP.NET Core 2.2.3 Hosting
Amsterdam (NL), London (UK), Washington, D.C. (US), Paris (France), Frankfurt (Germany), Chennai (India), Milan (Italy), Toronto (Canada) and São Paul(Brazil) Data Center
World Class Plesk Control Panel
Affordable price for a High availability solution
24/7/365 Customer-centric Care & Support
99.9& Uptime Guarantee
Daily Backup
Dedicated Pool
High Availability built in
Built on enterprise-grade hardware


Our Technical Features:
• One click Publish - Web Deploy Hosting
• Windows 2008 R2 and Windows 2012 Server
• ASP.NET 4, ASP.NET 4.5.2 Hosting, ASP.NET 4.6 Hosting ASP.NET 5 Hosting
• ASP.NET MVC 3 hosting, ASP.NET MVC 4 Hosting, and NEW ASP.NET MVC 6 Hosting
• MSSQL 2008, 2008 R2 Hosting, SQL 2012 and MSSQL 2012 R2
• SSRS 2008, SSRS 2008 R2 Hosting, and SSRS 2012 Hosting
• Silverlight 4, WCF RIA Hosting Support, Silverlight 5 and and Silverlight 6 Hosting
• IIS 7.5 Hosting, IIS 8 and IIS 8.5 Hosting
• PHP 5 and MySQL 5 Support
• Crystal Report 2010 Hosting Support
• Node.js Hosting
• Other application like WordPress, Joomla Hosting, Nopcommerce, osCommerce Online Merchant Hosting, Magento Hosting, Drupal , PrestaShop, DotNetNuke, BlogEngine.NET, Drupal Hosting, Umbraco, Moodle Hosting etc.

WHY CHOOSE US?
Using industry-standard web environments with the latest stable technologies like Server 2012, Internet Information Services 8.5, SQL 2012, ASP.NET 3.5 SP1, ASP.NET 4, ASP.NET 4.5.1, ASP.NET 4.5.2, ASP.NET 4.6 and ASP.NET 5. Using powerful Dell servers that are beefy enough to service the requirements of our customers. Our servers use 64 bit software, are dual quad-core, have at least 16 GB RAM, and have RAID 10 disk arrays. We don't skimp on our servers because we believe you deserve better.

We're dedicated to being more than just another web hosting provider as we see ourselves as a long-term business partner tasked with handling a critical component of your website. Combining industry-best practices and staff with cutting-edge knowledge and expertise, we provide the stability and reliability you need to realize success in today's modern world.

ANY QUESTION?
If you have any questions or concerns before you sign up, please feel free to email us at sales@hostforlife.eu or send us a tweet @HostForLIFE

Recommended by
This thread is recommended by ReliableHostingASP.NET. ReliableHostingASP.NET is Windows and ASP.NET Hosting blog review in UK. With ReliableHostingASP.NET you can find the best hosting plan that you need easily. There are many top hosting recommendations that give you the best ever offered. ]]>
Web Hosting Offers dotnetmaster http://forums.devshed.com/web-hosting-offers-100/hostforlife-eu-limited-sale-15-cheap-asp-net-core-2-2-3-hosting-981510.html
Is public address static or not http://forums.devshed.com/networking-help/981509-public-address-static-new-post.html Sat, 18 May 2019 22:12:44 GMT Hi, I am trying to determine if my public IP is static or dynamic. I went on to site 301 Moved Permanently (http://whatismyip.com) and the result I got was: Your Public IPv6 is: 2a01:4b00:8942:3f00:a15f:16ed:b7e:a132 Your IPv4 is: 37.156.74.240 I then switched off router for five minutes and restarted it. I then got the following result: Your Public IPv6 is:... Hi,
I am trying to determine if my public IP is static or dynamic. I went on to site 301 Moved Permanently and the result I got was:
Your Public IPv6 is: 2a01:4b00:8942:3f00:a15f:16ed:b7e:a132
Your IPv4 is: 37.156.74.240
I then switched off router for five minutes and restarted it. I then got the following result:
Your Public IPv6 is: 2a01:4b00:8942:3f00:41f6:d56b:72bc:e0ce
Your IPv4 is: 37.156.74.240
The IPv4 remained the same while IPv6 changed. What does it mean, is the address static or dynamic? All help will be greatly appreciated. ]]>
Networking Help raydona http://forums.devshed.com/networking-help-109/public-address-static-981509.html
Cheap VPS to buy ...where from? http://forums.devshed.com/web-hosting/981507-cheap-vps-buy-new-post.html Fri, 17 May 2019 17:59:50 GMT VPS accounts from libertyvps.net and yourlasthost.com are advised me to have a deal with and I wonder which one the best would be? VPS accounts from libertyvps.net and yourlasthost.com are advised me to have a deal with and I wonder which one the best would be? ]]> Web Hosting enshtain http://forums.devshed.com/web-hosting-12/cheap-vps-buy-981507.html Help with finding a solution to watermark on video being unsharp/pixelated http://forums.devshed.com/php-development/981506-help-finding-solution-watermark-video-unsharp-pixelated-new-post.html Fri, 17 May 2019 16:00:46 GMT the web video script that I’m using adds a watermark successfully, however, the watermark.png looks ok on the small screen, but when full screen is selected the watermark.png image looks much less sharp. ‘scale2ref’ seems like a possible solution. I have tried different attempts with it without success. The ffmpeg documentation shows: “Scale a logo to 1/10th the height of a video, while... the web video script that I’m using adds a watermark successfully, however, the watermark.png looks ok on the small screen, but when full screen is selected the watermark.png image looks much less sharp.

‘scale2ref’ seems like a possible solution. I have tried different attempts with it without success. The ffmpeg documentation shows:

“Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio”:
[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]

I need guidance with integrating scale2ref into a current line of code, for example:

$ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.escapeshellarg($watermark_image_full_path).' -i '.escapeshellarg($watermark_image_full_path).' -filter_complex "scale=426:-2, scale=426:-2, overlay=10:10, overlay=170:170:enable=between(t\,5\,5+2)" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 '.$video_output_full_path_240.' 2>&1';

any additional assistance is appreciated. ]]>
PHP Development chrisjchrisj http://forums.devshed.com/php-development-5/help-finding-solution-watermark-video-unsharp-pixelated-981506.html
Lottie: Innovation or Limitation For Designers? http://forums.devshed.com/software-design/981505-lottie-innovation-limitation-designers-new-post.html Fri, 17 May 2019 12:07:59 GMT Lottie is an iOS, Android, and React Native library that renders After Effects animations in real time. Lottie allows engineers to build richer animations without the painstaking overhead of re-writing them. Want to know more about apps for creating animations (https://steelkiwi.com/blog/lottie-by-airbnb-for-designers)? Then this article is for U )) * Have you already worked with it?* Lottie is an iOS, Android, and React Native library that renders After Effects animations in real time. Lottie allows engineers to build richer animations without the painstaking overhead of re-writing them. Want to know more about apps for creating animations? Then this article is for U ))

Have you already worked with it?
]]>
Software Design CrimsonSpell http://forums.devshed.com/software-design-43/lottie-innovation-limitation-designers-981505.html
Database Update On Change http://forums.devshed.com/php-development/981504-database-update-change-new-post.html Thu, 16 May 2019 21:31:54 GMT Been racking my brain, not finding a solution out there, so not even sure this can be done. I would like to be able to dynamically update a database when a user changes a field, and not have them click a submit button and have the page reload. Essentially, they will be on a page that has 50 or more input fields. When they make a change to one of those input fields, the database will need to... Been racking my brain, not finding a solution out there, so not even sure this can be done.

I would like to be able to dynamically update a database when a user changes a field, and not have them click a submit button and have the page reload.

Essentially, they will be on a page that has 50 or more input fields. When they make a change to one of those input fields, the database will need to be updated as they make the changes.

I assume Ajax will be needed to do this, but as I stated, I haven't found a solution so far.

Thanks in advance for any help! ]]>
PHP Development TKramer http://forums.devshed.com/php-development-5/database-update-change-981504.html
RegEx for renaming http://forums.devshed.com/regex-programming/981503-regex-renaming-new-post.html Thu, 16 May 2019 16:23:40 GMT Hi all, I hope this is the right place. So this is completely uncharted territory for me... I recently downloaded an app called RegEx Renamer that provides a GUI to put in Regular Expressions to rename files – but I am complete novice (I used to use a Mac program for that that was all GUI but I recently switched to Win 10). Can anyone help me with what expressions I need to feed into... Hi all,

I hope this is the right place.

So this is completely uncharted territory for me...

I recently downloaded an app called RegEx Renamer that provides a GUI to put in Regular Expressions to rename files – but I am complete novice (I used to use a Mac program for that that was all GUI but I recently switched to Win 10).

Can anyone help me with what expressions I need to feed into the app to rename a bunch of randomly named files into a format with an unchanging sequence of letters at the beginning and a running 3-digit number at the end (preferably with the option to start at a number other than 000).

Is that even a thing that regular expressions can do?

Cheers,
Marco ]]>
Regex Programming Bonteburg http://forums.devshed.com/regex-programming-147/regex-renaming-981503.html
Trustworthy SSD VPS deals from kvchosting.net with affordable prices. http://forums.devshed.com/web-hosting-offers/981500-trustworthy-ssd-vps-deals-kvchosting-net-affordable-prices-new-post.html Thu, 16 May 2019 10:20:07 GMT KVC Hosting was started in 2010 with the sole purpose of creating a host company that was affordable to all. Since its inception, the company has had steady growth due to our practical business model, so much so that we've increased the size of our data center in order to meet the demands of our clients. Putting customers first is what drives us, and this has led to us winning multiple awards for providing quality technology at a great price. We focus on providing cost-effective web hosting solutions, and our extensive experience in the industry assures that you will receive high quality and economical web hosting options that can be customized to suit your needs. We are proud of the trust that our partners and customers have placed in us and welcome all to give our company a try.
Be in charge of your own Virtual Private Server (VPS Hosting)! It will work just as if you have your own machine.

Our virtual private servers are affordable and powerful, offering you your own mail server and greater security control. SSD VPS Hosting is a great fit for businesses that are anticipating quick growth, huge website traffic, or who run highly dynamic, interactive websites.


SSD VPS HOSTING

Enterprise Cloud SSD VPS
P1
8 GB DDR3 RAM
100 GB SSD RAID 10
4 CPU XEON@ 2.13 GHz (8.52GHz)
6 TB Premium Bandwidth
$49.99/M
ORDER NOW

P5
24 GB DDR3 RAM
300 GB SSD RAID 10
8 CPU XEON@ 2.13 GHz (17.0GHz)
22 TB Premium Bandwidth
$169.99/M
ORDER NOW

REGULAR VPS

VPS K
Disk Space - 75 GB
Bandwidth - 200 GB
RAM - 4 GB
CPANEL/WHM - Free
$25.99/M
ORDER NOW!

VPS O
Disk Space - 225 GB
Bandwidth - 3 TB
RAM - 10 GB
CPANEL/WHM - Free
$79.99/M
ORDER NOW!


Have a question?
Please feel free to contact us: sales at kvchosting.net
]]>
Web Hosting Offers KVChosting_ http://forums.devshed.com/web-hosting-offers-100/trustworthy-ssd-vps-deals-kvchosting-net-affordable-prices-981500.html
<![CDATA[[Laradock] docker-compose works only the first time]]> http://forums.devshed.com/php-development/981499-laradock-docker-compose-time-new-post.html Thu, 16 May 2019 09:38:20 GMT I'm starting to use Docker with Laravel, so I installed Laradock inside my existing Laravel project following the documentation, every step until the command
docker-compose up -d nginx mysql

the first time the command works and I can use my application.
Then I've used the command

docker-compose stop
and of course I can't reach my site because the webserver is off

running again
docker-compose up -d nginx mysql

I obtain this error
Quote:

ERROR: for laradock_mysql_1 Cannot start service mysql: error while creating mount source path '/host_mnt/c/xampp/htdocs/laratest/laradock/mysql/docker-entrypoint-initdb.d': mkdir /host_mnt/c/xampp/htdocs/laratest: file exists
I've already tried
docker-compose down
before to run again the up command, but with no luck

why does this happen?
How do I correctly stop Docker and restart again?

P.S.
You see the path c/xampp/htdocs, that is where my projects are (until now I was used to use xampp for developing webapps on my local machine), but xampp is now not started, so it doesn't have any effect on Docker.
I'm on a Windows 10 machine ]]>
PHP Development Alhazred http://forums.devshed.com/php-development-5/laradock-docker-compose-time-981499.html
Is there a way to find, replace and display the specific XML node/elements given an a http://forums.devshed.com/programming/981498-replace-display-specific-xml-node-elements-new-post.html Thu, 16 May 2019 06:11:32 GMT I'm making a generic XML class that can find, replace and display specific XML nodes/elements based on the inputted string.

I've already made a generic XML class that outputs the contents of the XML. By generic I mean, it can cater other XML files that doesn't have the same fields.

Void Main();
{
string fileName = @" ";
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
xmlNode rootNode = doc.DocumentElement
DisplayNode(rootNode);
Console.ReadLine();
}

private static void DisplayNode(XmlNode node)
{
if (node.NodeType == XmlNodeType.text)
{
//print nodetype and values
}
else
{
//print nodetype and names
}

if (node.Attributes != null)
{
XmlAttributeCollection attrib = node.Attributes;
foreach (XmlAttribute attr in attrib)
{
//print attrib names and values
}
}

XmlNodelist childs = node.ChildNodes;
foreach(XmlNode child in childs)
{
// print childs
}

//heres the string values
string input = "1", "0", "Kenwood", "VA{0}";

It output the contents of the specific XML File. ]]>
C Programming Rushabh Verma http://forums.devshed.com/programming-42/replace-display-specific-xml-node-elements-981498.html
Parent child select query http://forums.devshed.com/mysql-help/981496-parent-child-select-query-new-post.html Thu, 16 May 2019 04:00:37 GMT I have the following query working OK: SELECT core_condition AS name, NULL AS parent FROM condition_theme_lookup UNION ALL SELECT theme_name AS name, condition_theme_lookup.core_condition AS parent FROM theme, condition_theme_lookup UNION ALL SELECT strand.strand_name AS name, theme.theme_name AS parent FROM strand I have the following query working OK:

SELECT core_condition AS name, NULL AS parent
FROM condition_theme_lookup
UNION ALL
SELECT theme_name AS name, condition_theme_lookup.core_condition AS parent
FROM theme, condition_theme_lookup
UNION ALL
SELECT strand.strand_name AS name, theme.theme_name AS parent
FROM strand
JOIN theme ON theme.theme_pk = strand.theme_fk

As JSON, this produces the following which is fine so far:

{
"name": "Condition",
"children": [{
"name": "Professional",
"children": [{
"name": "Professional Behavours"
}, {
"name": "Self-Care and Self-Awareness"
}, {
"name": "Medical Ethics and Law"
}]
}, {
"name": "Leader",
"children": [{
"name": "Teamwork and Leadership"
}, {
"name": "Collaborative Practice"
}, {
"name": "Health Systems and Careers"
}]
}, {
"name": "Advocate",
"children": [{
"name": "Health Advocacy"
}, {
"name": "Aboriginal Health"
}, {
"name": "Diversity and Inequality"
}, {
"name": "Health Promotion"
}]
}, {
"name": "Clinician",
"children": [{
"name": "Scientific Knowledge"
}, {
"name": "Patient Assessment and Clinical Reasoning"
}, {
"name": "Patient Management"
}, {
"name": "Patient Perspective"
}, {
"name": "Clinical Communication"
}, {
"name": "Quality Care"
}]
}, {
"name": "Educator",
"children": [{
"name": "Life-Long Learning"
}, {
"name": "Mentoring Relationships"
}, {
"name": "Patient Education"
}, {
"name": "Teaching and Learning"
}, {
"name": "Assessment and Evaluation"
}]
}, {
"name": "Scholar",
"children": [{
"name": "Research and Biostatistics"
}, {
"name": "Evidence-Based Practice"
}, {
"name": "Information Literacy"
}]
}]
}

I now want to modify this query to add the children 'Year 1', 'Year 2', 'Year 3' and 'Year 4' (from table year.year) to each strand parent (e.g. Professional Behaviours, Medical Ethics and Law etc).

I have tried the following modified query:

SELECT core_condition AS name, NULL AS parent
FROM condition_theme_lookup
UNION ALL
SELECT theme_name AS name, condition_theme_lookup.core_condition AS parent
FROM theme, condition_theme_lookup
UNION ALL
SELECT strand.strand_name AS name, theme.theme_name AS parent
FROM strand, theme
UNION ALL
SELECT year.year AS name, strand.strand_name AS parent
FROM year, strand
JOIN theme ON theme.theme_pk = strand.theme_fk

but it's not producing the correct relationships:

{
"name": null,
"children": [{
"name": "Professional"
}, {
"name": "Leader"
}, {
"name": "Advocate"
}, {
"name": "Clinician"
}, {
"name": "Educator"
}, {
"name": "Scholar",
"children": [{
"name": "Professional Behavours"
}, {
"name": "Self-Care and Self-Awareness"
}, {
"name": "Teamwork and Leadership"
}, {
"name": "Collaborative Practice"
}, {
"name": "Health Systems and Careers"
}, {
"name": "Health Advocacy"
}, {
"name": "Aboriginal Health"
}, {
"name": "Diversity and Inequality"
}, {
"name": "Health Promotion"
}, {
"name": "Scientific Knowledge"
}, {
"name": "Patient Assessment and Clinical Reasoning"
}, {
"name": "Patient Management"
}, {
"name": "Patient Perspective"
}, {
"name": "Clinical Communication"
}, {
"name": "Quality Care"
}, {
"name": "Life-Long Learning"
}, {
"name": "Mentoring Relationships"
}, {
"name": "Patient Education"
}, {
"name": "Teaching and Learning"
}, {
"name": "Assessment and Evaluation"
}, {
"name": "Research and Biostatistics"
}, {
"name": "Evidence-Based Practice"
}, {
"name": "Information Literacy"
}, {
"name": "Medical Ethics and Law",
"children": [{
"name": "Year 1"
}, {
"name": "Year 2"
}, {
"name": "Year 3"
}, {
"name": "Year 4"
}]
}]
}]
}

theme.sql https://130.95.21.120/md/theme.sql

strand.sql https://130.95.21.120/md/strand.sql

year.sql https://130.95.21.120/md/year.sql ]]>
MySQL Help peterbrowne http://forums.devshed.com/mysql-help-4/parent-child-select-query-981496.html
SQLite Compare http://forums.devshed.com/android-development/981495-sqlite-compare-new-post.html Thu, 16 May 2019 00:46:12 GMT Hey guys! im a bit lost in Sqlite..i just converted some stuff in my app from sharedpref to sql.. So i have a a table called Vod that store all my movies (name,icon,url..) . (from a json API) when i update my list a created a temp table to store the new data downloaded (there is a button update or on load i check) the goal is to compare both and only add to the Vod table the missing... Hey guys! im a bit lost in Sqlite..i just converted some stuff in my app from sharedpref to sql..


So i have a a table called Vod that store all my movies (name,icon,url..) . (from a json API)

when i update my list a created a temp table to store the new data downloaded (there is a button update or on load i check)

the goal is to compare both and only add to the Vod table the missing movies?

cause i also want to show the new movies...

Unless there is a way to update the table with only the new data and then find out what movies were added?

im a clear?lol cause in my head i think so...lol ]]>
Android Development techker http://forums.devshed.com/android-development-165/sqlite-compare-981495.html