How JustAnswer Works:

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

Ask chrisaw Your Own Question

chrisaw
chrisaw, DevOps Manager
Category: Programming
Satisfied Customers: 13
Experience:  DevOps Manager with over 10 years experience in the DevOps and IT field.
58355812
Type Your Programming Question Here...
chrisaw is online now

I would like to echo out my id from my search page to the

Resolved Question:

i would like to echo out my id from my search page to the next page i have tried so many thigns and given up as it will not work i hope you can help as single item so shen a user presses the button i want the id to go to the next page thats al i provided the files but cannot provide the database as it on a server as mysql has changed to mysqli i need to brush up however otherwsie if it was mysql it would been no issue for me trying to send the id from the database to the next page of that item or even the whole row i wouldn't mind sending it to the next page which is easier i tried sessions and hyperlinks but won't work for i hope u can help i want to send one row when clicked from browsecar to car thank you
Submitted: 10 months ago.
Category: Programming
Expert:  chrisaw replied 10 months ago.
Hi Sam, Just taking a look through your script now and will get back to you shortly with an answer. :) Christopher
Expert:  chrisaw replied 10 months ago.
Hi Sam, I've had a look through your code and believe I have resolved the issue (as well as cleaned up the formatting a little - happy to revert this if you prefer.) Please could you try the attached file and let me know if you have any problems! Thanks! Christopher
Customer: replied 10 months ago.
thank you for this can i ask if u online and i will pay you more for this as you helped a lot to me and the formatting is fine in my select where its says browse i added in my where clause where make like you got browse and status != "sold but it doesn't like it and still shows the cars depsite being sold i know you busy and if you don't wish to anwser this that is fine i will pay the same amount as paying for this question or do u wish me to put it as a seperate question
Expert:  chrisaw replied 10 months ago.
Hi again Sam, No problem - I'll look at it in this question and you can just add the payment as a bonus if you want to. :) I'll just have a look and get back to you shortly! Christopher
Expert:  chrisaw replied 10 months ago.
Hi again, Just had a look at the code - it looks like the correct query would be: $sql = "SELECT * FROM cars WHERE make LIKE '%".$browse."%' AND status != 'sold'"; It's a little tricky because I don't have the database available to test but hopefully that fixes the problem! If not - just let me know what does happen and I'll have another look! :) Thanks! Christopher
Customer: replied 10 months ago.
thank you would this matter with sql workbench as it returns nill
Expert:  chrisaw replied 10 months ago.
Hi Sam, In order to try this with a tool like SQL workbench you would have to change the query to be something along the lines of: SELECT * FROM cars WHERE make LIKE '%BMW%' AND status != 'sold' You would need to replace BMW with a brand in your database which isn't currently sold.
Customer: replied 10 months ago.
however the trouble is the first query u said which i agree on won't work in workbench it suppose to get the client if they purchased the car to be sold and not to be seen again in the search as two people cannot buy the same car so would the first one work then as it doesn't in workbench nor does the second one
Expert:  chrisaw replied 10 months ago.
Would it be possible for you to take a screenshot of some of the data in the database? It would help to know what data I'm working with. :) Thanks! Christopher
Customer: replied 10 months ago.
sure sorry about this attached
Customer: replied 10 months ago.
trouble is the client cannot search on the database or they will break it then the whole system would go down but in the browse if they click if the car is sold they cannot see it or your have two clients wanting the same car already sold
Expert:  chrisaw replied 10 months ago.
Just to clarify the problem - the concern is that when the customer clicks "buy" the car is still listed as available in the database instead of sold? So essentially you're wanting the customer clicking "buy" to actually update the database to show the car as sold. Is that correct? If not - could you possibly explain a little further on what this script needs to do? :) In order to see *only* sold cars you can use: SELECT * FROM cars WHERE make LIKE '%Alfa%' AND status == 'sold' To see only cars *not sold* you can use: SELECT * FROM cars WHERE make LIKE '%Alfa%' AND status != 'sold' Thanks!
Customer: replied 10 months ago.
thanks the issue is the cars at present will be updated manually once the client has bought them on the admin side
however when this is done if another client searchs for the exact car he won't be able to he could search for all the cars via the browse button but not the one that has been sold as they will not have access to the database so they cannot use workbench i only used workbench as my query did not work to test for deubbuging errors i willb eusing the %browse%
Expert:  chrisaw replied 10 months ago.
So essentially you want the car to still show up in the listings but show up as "Sold" rather than available for sale?
Customer: replied 10 months ago.
that would be a work around but i don't want the car to show up
Expert:  chrisaw replied 10 months ago.
Ah, understood! I believe the following query should allow you to show only cars which have not yet sold. SELECT * FROM cars WHERE make LIKE '%Alfa%' AND (status IS NULL OR status <> 'sold')
Customer: replied 10 months ago.
how would u put this in the content in the php so it be
SELECT * FROM cars WHERE make LIKE '%browse%' AND (status IS NULL OR status <> 'sold');
Expert:  chrisaw replied 10 months ago.
$sql = "SELECT * FROM cars WHERE make LIKE '%".$browse."%' AND (status IS NULL OR status <> 'sold')";
chrisaw, DevOps Manager
Category: Programming
Satisfied Customers: 13
Experience: DevOps Manager with over 10 years experience in the DevOps and IT field.
chrisaw and other Programming Specialists are ready to help you
Customer: replied 10 months ago.
thank you so much
Expert:  chrisaw replied 10 months ago.
Hi again, Absolutely no problem! :) Feel free to ask for me with any IT / programming problems you're having. :) Thanks! Christopher
Customer: replied 10 months ago.
will do if i need help but thank you so much u a star

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 Customer
< Previous | Next >
  • 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 Customer
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C.
  • 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!!!! Alex
  • 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. GP
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin
  • 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. Esther
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C.
 
 
 

Meet The Experts:

 
 
 
  • ATLPROG

    ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7260
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Previous | Next >
  • http://ww2.justanswer.com/uploads/SP/spatlanta2010/2011-6-23_12450_photo.64x64.gif ATLPROG's Avatar

    ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7260
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Computer Software Engineer

    Satisfied Customers:

    5514
    Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
  • http://ww2.justanswer.com/uploads/lifesaver333/2010-10-17_191349_ls.jpeg lifesaver's Avatar

    lifesaver

    Computer Software Engineer

    Satisfied Customers:

    936
    Several years of intensive programming and application development experience in various platforms.
  • http://ww2.justanswer.com/uploads/EH/ehabtutor/2012-8-2_202016_1.64x64.jpg ehabtutor's Avatar

    ehabtutor

    Computer Software Engineer

    Satisfied Customers:

    766
    Bachelor of computer science, 5+ years experience in software development, software company owner
  • http://ww2.justanswer.com/uploads/eljonis/2010-01-06_130406_eljon2.jpg Eljon's Avatar

    Eljon

    Consultant

    Satisfied Customers:

    558
    Founder of StockCanvas.com
  • http://ww2.justanswer.com/uploads/FA/fael/2011-1-15_104041_profile500x500.64x64.jpg Rafael Martins's Avatar

    Rafael Martins

    Computer Software Engineer

    Satisfied Customers:

    446
    Desktop, Mobile and Web Developer. 7+ years of experience. Creative solutions provider.
  • http://ww2.justanswer.com/uploads/CH/chutz747/2011-11-6_14231_me.64x64.jpg The-PC-Guy's Avatar

    The-PC-Guy

    Software Engineer

    Satisfied Customers:

    320
    Extensive Knowledge in PHP, MYSQL, CSS & Javascript