Completed

Sql Join fix

The problem I am having is I am trying to query to get an online list of only members of a specific sex value. you can see the code below.. the problem is in the "JOIN skadate_profile" section.. it is very possible I did this completely wrong. this script is from "arrowchat" so if you can find a fix for this quickly send me a bid.. IF you are unsure do not bother to bid.

if ( $gender == 1 ) {

$sql = ("

SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, (SELECT concat(profile_id,'_',photo_id,'_'," . TABLE_PREFIX . "[url removed, login to view]) from " . TABLE_PREFIX . "profile_photo where profile_id = " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " and status = 'active' limit 1) avatar, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " link, arrowchat_status.is_admin, [url removed, login to view]

FROM " . TABLE_PREFIX . DB_USERTABLE . "

JOIN arrowchat_status

ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = [url removed, login to view]

WHERE ('" . time() . "' - arrowchat_status.session_time - 60 < '" . $online_timeout . "')

AND " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " != '" . $db->escape_string($userid) . "' JOIN skadate_profile

ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = skadate_profile.profile_id

WHERE sex = '2'

ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC

"); }

Skills: MySQL, PHP, SQL

See more: asc it, join me, fix mysql query, find and fix, link sql, fix query, sql select select, sql select order, sql select, sql problem, avatar sex, sql select script, mysql join, time limit link script, php mysql online order script, php fix sql code, php mysql online gender, arrowchat, arrowchat script, php concat script

About the Employer:
( 3 reviews ) Davao City, Philippines

Project ID: #5540808

Awarded to:

wotoinfo

expression "JOIN skadate_profile ON "TABLE_PREFIXDB_USERTABLE"."DB_USERTABLE_USERID" = skadate_profile.profile_id" you need to put before first "WHERE". Condition "sex = '2'" included in the query through "AND"

$15 USD in 1 day
(0 Reviews)
0.0

14 freelancers are bidding on average $25 for this job

tlchung

let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now. let fix it now.

$24 USD in 1 day
(186 Reviews)
7.0
powertech

A proposal has not yet been provided

$30 USD in 1 day
(71 Reviews)
6.6
MakhijaRavi

Hello Sir/Madam, I have just seen your Job posting and upon reading thoroughly, I felt strongly that I would be the most qualified contractor for this project. My skills include Web Design, Graphic Design, and Web Deve More

$33 USD in 0 days
(13 Reviews)
4.6
shennz

Hi, As I have gone through the query I see think that you haven't used a table field in the left hand side table when joining with arrowchart_status

$30 USD in 1 day
(4 Reviews)
3.3
AliSafder

I have over 6 years of experience in Databases like Sql Server, Oracle, Microsoft Access and MySQL, Programming languages like .Net technologies(Asp.Net, Vb.Net / C# ) ,PHP, WordPress, etc. Scripting Languages j More

$20 USD in 1 day
(4 Reviews)
2.3
magent0

Hi , I do have experience with skadate dating software and i see ur query was throwing error since u havent used the join syntax properly, it shouldnt be comeup on where clause. I will fix this issue for you. I dont h More

$15 USD in 1 day
(1 Review)
1.4
SCKRamana

I am ready fix this SQL query , with in 4 hours More

$20 USD in 0 days
(3 Reviews)
1.2
imaginationstech

hello i have good experience in joomla,wordpress,javascript,mvc and jquery so i can do this if you want to i work for you then pm me . thanks

$35 USD in 1 day
(1 Review)
0.7
tekinfinity

Dear Sir, we are pleased to inform you that we have studied all the requirements and can deliver the same to u .we already have similar work experience and have worked on similar projects in the past and can deliver More

$35 USD in 1 day
(0 Reviews)
0.0
zmj

i'm a college student in China with Computer Science as my major and i can fix this within one day:)

$55 USD in 1 day
(0 Reviews)
0.0
CFMLGuru

Mr. Mindanao, I would be happy to resolve this for you. It is a quick and easy fix. I have 18 years of experience in SQL Server, Oracle, and MySQL. I can knock it out for you immediately. I have no bids on Freel More

$15 USD in 0 days
(0 Reviews)
0.0
nksundaram

try this and let me know if it works. (" SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_sta More

$25 USD in 1 day
(0 Reviews)
0.0
catstevens2009

Hi there! The SQL is good up until the FROM clause but needs just a little bit of re-ordering at the end to conform to the standard SQL syntax. I do have the code modified and ready to go, feel free to message me in More

$15 USD in 0 days
(0 Reviews)
0.0
nirmalsharma13

Hi Ricky, Please don't mind your query is wrong. Wrong pattern: $sql = ("........"); Right Pattern: $sql- " ...."; No need to put (.......); here... If you want to test your query by yourslef, just write More

$15 USD in 1 day
(0 Reviews)
0.0