php - Mysql Inner Join Error on server -


i running query on localhost, , works fine. if upload server (fatcow) results in syntax error, unless reduce inner join two, , not matter table take out. on server, long there 2 tables joined, works no syntax error! question different because has nothing mysqli, john conde. has server limiting number of joins or selects. please not mark questions 'already answered' , direct place not answer question.

$sqlstr="select        client.clientid,        client.fname,        client.lname,        client.email,        client.ctype,        client.uname,        userprofile.skilllevel,        userprofile.dob,        userprofile.sex,        userprofile.startdate,        userprofile.lotno,        userprofile.partnercid,        useraddress.address,        useraddress.city,        useraddress.state,        useraddress.zip,       userphone.phonenumber   client        inner join userprofile       on client.clientid = userprofile.clientid        inner join useraddress       on client.clientid = useraddress.clientid        inner join userphone        on userprofile.clientid = userphone.clientid                  client.ctype='1'           , client.valid='1'           , useraddress.primaryaddr = '1'           , userphone.primaryphone = '1'           order client.lname asc"; $sql=mysql_query($sqlstr) or die("cidlistpick failed!"); if (mysql_num_rows($sql) > 0) {     $lastchar="";    $firstrun="";//if set somethign else, passed first iteration.    $i=0;    while ($t=mysql_fetch_array($sql)) {... 

i can take 1 of tables out join , work on server. or, precise code above joins work on localhost. have checked table , field names , correct. entire database size maximum of 660 records in 'client', , same joined each of other tables.

here error message:

20151002t102522: www.internetmarketingofsandiego.com/htpb/index.php php warning: mysql_num_rows() expects parameter 1 resource, boolean given in /hermes/waloraweb097/b516/moo.ilssystemcom/imsd/htpb/apages/ins_cidlistpick.php on line 611 php warning: mysql_fetch_array() expects parameter 1 resource, boolean given in /hermes/waloraweb097/b516/moo.ilssystemcom/imsd/htpb/apages/ins_cidlistpick.php on line 670 php warning: mysql_num_rows() expects parameter 1 resource, boolean given in /hermes/waloraweb097/b516/moo.ilssystemcom/imsd/htpb/apages/ins_cidlistpick

line 670:

while ($t=mysql_fetch_array($sql)) {.... 

use mysqli instead of mysql :)

$exe = mysqli_query($your_connection,$query); 

then use mysqli_num_rows() works fine


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -