This is a discussion on "SQL query not working anymore" within the Databases section. This forum, and the thread "SQL query not working anymore are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
SQL query not working anymore
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
SQL query not working anymore
Dear all,
Was wondering if someone could help. I have recently transferred to a new server that runs an upgraded version on sql. My previous sql was hosted on Cpanel: Server version: 5.0.51a-community MySQL client version: 5.0.51a My new server is hosted by Heart Internet's extend: Server version: 4.1.22-standard MySQL client version: 4.1.22 With a few tweaks I managed to get my site working on the new server, all apart from one query and I cant solve it. I have also had another coder try and he counldnt either! I have a copy of the site still running on the old server so that you can see the difference. Could anyone help? More info: Its an estate agents website, and the query is retreving information from a search. Last edited by markusdavid; Jun 29th, 2008 at 18:01. Reason: add more info |
|
|
|
#2
|
||||
|
||||
|
Re: SQL query not working anymore
Do you have the SQL for the query? Can you show us?
|
|
#3
|
|||
|
|||
|
Re: SQL query not working anymore
Thank you for replying marc. Literally the guy who was working on it has just solved it! I have no idea how but its working! I really appreciate you replying though.
|
|
#4
|
||||
|
||||
|
Re: SQL query not working anymore
No problem mate. Just for future reference of different members, what was the solution (if you can share of course!)
Cheers and glad you got it sorted! |
|
#5
|
|||
|
|||
|
Re: SQL query not working anymore
Hi marc, would loved to have shared, but I have no idea what they guy has done! He done stuff to the database and my query and other stuff in my sql/php. I wouldnt know where to begin! Sorry about that.
|
|
#6
|
|||
|
|||
|
Re: SQL query not working anymore
Hi all,
I don't know the difference between the old mysql Server version: 4.1.22-standard and the new Server version: 5.0.51a-community, but I've noticed a few things which I would like to share with you. It seems that some queries run on the old server don't work on the new version. I think the easiest way to explain this is the difference between HTML and XHTML. The new Server version: 5.0.51a-community is more complex and requires more detailed and correct information. The new Server version: 5.0.51a-community doesn't 'think' In markusdavids case it didn't know where to get the information from, although it was obvious for the old version and for a coder i.e: a form action = post ... the old version would automatically get the information from the form, for the new version you have to specify $client = $_POST['client'] Do I make sense??? I'm having a problem with the new version myself at the moment and I'm not sure how to do it. Why did they make it so difficult for us????? Thanks for reading my waffle DeMan |
|
#7
|
|||
|
|||
|
Re: SQL query not working anymore
that sounds like a difference in the register globals setting, that's a PHP setting, not a MySQL one... or I've got completely the wrong end of the stick lol
Stu |
|
#8
|
|||
|
|||
|
Re: SQL query not working anymore
Ok, I've got a question then
Why does a query work on the old version but not on the new one? what are the main differences in coding php for the new Mysql version? I've got one at the moment and I'm struggeling does anyone know????? Thanks DeMan |
|
#9
|
|||
|
|||
|
Re: SQL query not working anymore
what is the exact query you are running ok on the old one, and that doesn't work on the new version?
Do you have an error message at all? |
|
#10
|
|||
|
|||
|
Re: SQL query not working anymore
Hiya,
this is the code, I got it from widgetmonkey.com. Its a exam question script (questions and answers are stored in the database) It works perfectly fine on the old version of the mysql Server. I don't get an error message, but the query doesn't run. Instead it goes back to the beginning (showing the questions and answers) No matter what I do, I can't get it to work. It seems like a little problem, but I'm drawing a blank. Any help would be greatly appreciated!!
|
|
#11
|
||||
|
||||
|
Re: SQL query not working anymore
Would you have happened to upgrade PHP as well? There are a few problems in the script that could happen depending on your PHP config.
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
|
|
#12
|
|||
|
|||
|
Re: SQL query not working anymore
Yep, PHP got upgraded from 2.11.0 to 2.11.4
I got the script so far that it actually goes to the page with the answers, but the answers aren't displayed. It seems that its not quering the database. Have you got any clues as to whats wrong with the code? |
|
#13
|
||||
|
||||
|
Re: SQL query not working anymore
Could you paste what the code outputs?
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
|
|
#14
|
|||
|
|||
|
Re: SQL query not working anymore
It queries the database and pulls out the correct answers, but doesn't compare the input answer with the correct one.
|
|
#15
|
|||
|
|||
|
Re: SQL query not working anymore
Has anyone got any ideas?
I just need some tips as to what has changed with the new php. thanks heaps |
|
#16
|
||
|
|