Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

I have two tables in a database. The first table includes…

Customer Question
I have two tables...

I have two tables in a database. The first table includes customer information including the campaign they came in on. The second includes info on the campaigns. For example, it has a column called "Category" that tells me the category or the campaign - search engine, for example. They have a column for the campaign name in common.

Technician's Assistant: Is there a specific language you're coding in?

I am coding in PHP querying a mysql database. The problem I have is I want to run queries where I say, add up the sales (which is in the customer info table) based on, for example, the categories that are in the second database.

Technician's Assistant: Anything else you want the programmer to know before I connect you?

I am getting an error:Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/bloginkg/public_html/stats/join2.php on line 31

Submitted: 7 months ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 9 minutes by:
1/5/2018
Programmer: George Sibiya, Computer Hardware Engineer replied 7 months ago
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 367
Experience: PhD in Computer Science
Verified

Hi,

Welcome to JustAnswer and thank you for utilising our services

I am looking at your code and will post back shortly.

Regards,

G

Ask Your Own Programming Question
Programmer: George Sibiya, Computer Hardware Engineer replied 7 months ago

Please try with mysqli as follows in PHP7:

$db = mysqli_connect($host, $username, $pass, $database);
$query = "SELECT York-Main.TotalSales FROM ...";
$result = mysqli_query($db,$query);

while($row = mysqli_fetch_assoc($result)) {

}

Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask George Sibiya Your Own Question
George Sibiya
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 367
367 Satisfied Customers
Experience: PhD in Computer Science

George Sibiya is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Need help with line of code, Php Wordpress automated robot
Warning: date() expects parameter 2 to be long, object given in /home/physicoolco/public_html/wp-includes/functions.php on line 104 Warning: date() expects parameter 2 to be long, object given in /home/physicoolco/public_html/wp-includes/functions.php on line 106 Warning: date() expects parameter 2 to be long, object given in /home/physicoolco/public_html/wp-includes/functions.php on line 108 Warning: date() expects parameter 2 to be long, object given in /home/physicoolco/public_html/wp-includes/functions.php on line 109104 before I changed it $datemonth = $wp_locale->get_month( date( 'm', $i ) );Was getting the above a alert104 after I changed it $datemonth = $wp_locale->get_month( date("m/d/y") );No alert just a blank area where the date should be..… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
I have a file I used to backup a database. I have a new
I have a file I used to backup a database. I have a new database PHP 5.5 so I have to convert the file to use mysqli instead of MySQL. This new file is not working and I am not sure what is wrong. I a… read more
The-PC-Guy
The-PC-Guy
Software Engineer
Bachelor's Degree
848 satisfied customers
php question: I have been trying to update my code from mysql
php question: I have been trying to update my code from mysql to mysqli functions and have been running into problems and am trying to fix them, but am getting errors like the one below, any suggestio… read more
The-PC-Guy
The-PC-Guy
Software Engineer
Bachelor's Degree
848 satisfied customers
PHP programming question. Need to select those students with
PHP programming question. Need to select those students with consecutive absences and those students with more than 2 absences and place them in new tables. The time frame will be established by the u… read more
The-PC-Guy
The-PC-Guy
Software Engineer
Bachelor's Degree
848 satisfied customers
Hi In mysql: I have a table directory with the business name
Hi In mysql: I have a table directory with the business name and other data I have a table categories I have a table cat2dir that links directory id with categories id First page html & jquery mobile … read more
SDSU_GURU
SDSU_GURU
58 satisfied customers
my question is regarding a php programing where i have to create
my question is regarding a php programing where i have to create a sign in / login and and log out php pages to add friends into a table and link them to another table to show the out but i will have … read more
Brandon M.
Brandon M.
System Administrator
Vocational, Technical or Trade Scho
2,143 satisfied customers
I am working on a mobile app. I'm not much of a programmer,
I am working on a mobile app. I'm not much of a programmer, kinda learning on the job. The app will access a URL like http://www.buzztouch.com/localrestaurants.php?deviceLatitude=[deviceLatitude]&devi… read more
Arty
Arty
Senior Administrator
Bachelor\u0027s Degree
469 satisfied customers
I am trying to code a page in wordpress, when on the click
I am trying to code a page in wordpress, when on the click of a button "Create Table", it will access the data base and create a table in that. But my site is not doing that. the code for php_code.php… read more
neelimark
neelimark
Embedded Software Engineer
Bachelor\u0027s Degree
458 satisfied customers
I am having difficulties with my site and trying to query some
I am having difficulties with my site and trying to query some databases back into a table on my site. I have ran the query many times in mySQL and the results come back just fine. However this time w… read more
WesPCDr
WesPCDr
Master\u0027s Degree
170 satisfied customers
Hi Ramesh: I want to make mysql database table show up on
Hi Ramesh: I want to make mysql database table show up on my home page at www.aircharterintel.com/home.htm However, the page needs to end in .php How can I do this???… read more
Ramesh Patil
Ramesh Patil
Master's Degree
417 satisfied customers
Hi Ramesh. I would like form results from database to appear
Hi Ramesh. I would like form results from database to appear at: http://www.aircharterintel.com/emptylegs.htm Cannot get it to work. Can you help?… read more
Ramesh Patil
Ramesh Patil
Master's Degree
417 satisfied customers
how do I store a selected value from a php dropdown list into
how do I store a selected value from a php dropdown list into my mysql database? the php dropdown list fetches existing records from tables already in the database (that function works fine) I just ne… read more
Louis vdW
Louis vdW
Bachelor's Degree
92 satisfied customers
Have some code with a MySQL query for authentication. That
Have some code with a MySQL query for authentication. That part works. Have another query that works as well but want them in the same module using same posted variables. Want to add second query to m… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
Need a basic message board/comment type script for users to
Need a basic message board/comment type script for users to comment on various products on a website. Using PHP with postgresql. This is the website below. read more
Programming Tutor
Programming Tutor
Free lancer
Master's Degree
365 satisfied customers
What is wrong with this code to update a mysql database public
What is wrong with this code to update a mysql database: public function updateStory($item) { … read more
Coder4Life
Coder4Life
CEO
High School or GED
76 satisfied customers
what is the code to connect my form to mysql database i keep
what is the code to connect my form to mysql database i keep getting an error in dreamweaver… read more
Coder4Life
Coder4Life
CEO
High School or GED
76 satisfied customers
Good morning, Im trying to add a dynamic drop-down menu
Good morning, I'm trying to add a dynamic drop-down menu to a form built in PHP. I want to populate that drop-down menu (box) with information from a categories table, be able to select one choice and… read more
Emiliano Marin
Emiliano Marin
Business Intelligence Specialist
High School or GED
6 satisfied customers
I am using Mysql and Php, I am trying to extract a total figure
I am using Mysql and Php, I am trying to extract a total figure of how much all of my students owe at any time Each student represents one row (of course) and the field in each row is named 'AmountDue… read more
Techie_Ben
Techie_Ben
Software Engineer
Master\u0027s Degree
1,444 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x