Find Jobs
Hire Freelancers

Conditional MySQL/PHP query: 1 database, 2 tables

$10-30 USD

已完成
已发布超过 10 年前

$10-30 USD

货到付款
There are 2 tables: sales_promotion category_description If a category ID exists in the sales promotion table (e.g.: 65) then I want this to be cross referenced with the category_description and if the category description matches a predefined string text string (in this example we will use $predefinedtext = "Childrens Mugs") then echo true. So you will for example need to reformat the sample data shown below in the sales_promotion table where this section ""category";a:2:{i:0;s:2:"65";i:1;s:2:"68";" contains the relevant category ID's. Attached are the tables I am working from. a:28:{s:15:"sales_promotion";a:1:{i:1;a:1:{s:4:"name";s:7:"£2 Off";}}s:4:"type";s:1:"F";s:8:"discount";s:1:"2";s:13:"quantity_type";s:1:"P";s:13:"quantity_sale";s:1:"0";s:12:"quantity_buy";s:1:"0";s:14:"quantity_total";s:1:"0";s:5:"total";s:1:"0";s:6:"logged";s:1:"0";s:8:"shipping";s:1:"0";s:14:"coupon_combine";s:1:"0";s:10:"uses_total";s:4:"1000";s:13:"uses_customer";s:4:"1000";s:15:"special_combine";s:1:"1";s:16:"discount_combine";s:1:"1";s:7:"product";a:0:{}s:11:"product_buy";a:0:{}s:5:"store";a:1:{i:0;s:1:"0";}s:14:"customer_group";a:1:{i:0;s:1:"1";}s:8:"currency";a:1:{i:0;s:1:"1";}s:8:"language";a:1:{i:0;s:1:"1";}s:3:"day";a:7:{i:0;s:6:"Monday";i:1;s:7:"Tuesday";i:2;s:9:"Wednesday";i:3;s:8:"Thursday";i:4;s:6:"Friday";i:5;s:8:"Saturday";i:6;s:6:"Sunday";}s:8:"category";a:2:{i:0;s:2:"65";i:1;s:2:"68";}s:12:"manufacturer";a:0:{}s:12:"category_buy";a:0:{}s:16:"manufacturer_buy";a:0:{}s:12:"product_type";s:1:"0";s:16:"product_buy_type";s:1:"0";}
项目 ID: 5253929

关于此项目

6提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Dear Sir, You want something like: select category_id, case when [login to view URL] like 'condition' then true else false end as flag from category_description a inner join sales_promotion b on a.category_id=b.category_id Wishing you the best, Ionut Rosca
$25 USD 在1天之内
5.0 (6条评论)
4.4
4.4
6威客以平均价$26 USD来参与此工作竞价
用户头像
A proposal has not yet been provided
$25 USD 在1天之内
5.0 (192条评论)
6.4
6.4
用户头像
JUST CHECK MY BADGES... There are only 4 freelancers with 100% of SQL Level3... I'm one of them... I'm waiting for your award...
$35 USD 在1天之内
5.0 (35条评论)
5.9
5.9
用户头像
Hi There, Can be done this project now. Please share this project now and please view my profile projects reviews. Thanks
$20 USD 在0天之内
4.9 (49条评论)
4.6
4.6

关于客户

UNITED KINGDOM的国旗
United Kingdom
5.0
2
会员自6月 18, 2013起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。