Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | PHP/SQL Help Please

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

PHP/SQL Help Please
Reply
 
Thread Tools
Old 31-07-2005, 00:25   #16
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: PHP/SQL Help Please

Ok, the username and password are correct.....

What error message are you getting now?

I only ask that because I've made a change, it's still not working, and I'm not getting any error messages - I wasn't even getting the one that you were getting
Raistlin is offline   Reply With Quote
Advertisement
Old 31-07-2005, 00:29   #17
iron25
Inactive
 
Join Date: Aug 2003
Location: nowhere
Posts: 718
iron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful one
Re: PHP/SQL Help Please

Can't use database : Access denied for user 'catswor_catswort'@'localhost' to database 'catswor_maps'
iron25 is offline   Reply With Quote
Old 31-07-2005, 00:32   #18
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: PHP/SQL Help Please

Ok, I've deleted that user and added a new one, then changed the user name and password in the PHP so that they match the new account created.

Still not working and still getting no error messages.....

Is there any chance that there's something not set up quite right somewhere that I don't have access to on the site?
Raistlin is offline   Reply With Quote
Old 31-07-2005, 00:35   #19
iron25
Inactive
 
Join Date: Aug 2003
Location: nowhere
Posts: 718
iron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful one
Re: PHP/SQL Help Please

In mysql you will need to give users rights to access certain databases and tables. You can assign the select/update/delete rights for each user for a database & table. I don't know how it works with your provider as I do it from either a linux prompt or webmin.
iron25 is offline   Reply With Quote
Old 31-07-2005, 00:41   #20
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: PHP/SQL Help Please

Ok, I think I'm getting somewehere.

Hadn't realised that you have to explicitly grant the user access to each database.....

Done that now and I-Web's admin panel actually supplies the connection strings.

The PHP now appears to be connecting to the database ok but I still get a blank page.

I am now seeing an error message in the source for the page though:

Quote:
<b>Warning</b>: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/home/catswor/public_html/maps/example.php</b> on line <b>34
Raistlin is offline   Reply With Quote
Old 31-07-2005, 00:43   #21
iron25
Inactive
 
Join Date: Aug 2003
Location: nowhere
Posts: 718
iron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful one
Re: PHP/SQL Help Please

I would suggest that there is a problem with your query section of the code. From the paste of the code you have:

$result = mysql_query("SELECT * FROM 'memberlocations'",$link);

If the memberlocations table exists then you do not need to put quotes around it:

$result = mysql_query("SELECT * FROM memberlocations",$link);
iron25 is offline   Reply With Quote
Old 31-07-2005, 01:06   #22
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: PHP/SQL Help Please



It's Working

Thanks for all the help guys, really appreciate it

It'll 404 at the moment though because I'm fiddling, give me a moment and I'll show you the result
__________________

Ok, it's working now.....

Click the balloon

It's the start of a little project that I've been wanting to have a go at for a while

Thanks again for all the help
Raistlin is offline   Reply With Quote
Old 31-07-2005, 01:54   #23
iron25
Inactive
 
Join Date: Aug 2003
Location: nowhere
Posts: 718
iron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful oneiron25 is the helpful one
Re: PHP/SQL Help Please

Quote:
Originally Posted by Raistlin
Click the balloon
Aaah, ain't that special
iron25 is offline   Reply With Quote
Old 01-08-2005, 00:18   #24
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: PHP/SQL Help Please

Quote:
Originally Posted by Paul M
The format of mysql_connect() is this ;

PHP Code:
mysql_connect('server', 'user', 'password') 
You then use the mysql_select_db() statement to connect to your database.
Sorry, just to be annoying here.
The mysql_select_db() function actually does a "use <database>" command.
The mysql_connect() function does establish the connection in the first place.

You can probably test this by using this code:
PHP Code:
<?php
if(!mysql_connect('server', 'username', 'password') {
echo 
'I can\'t connect!';
exit;
}
else {
echo 
'Connected OK!';
}
?>
Richard M is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 14:39.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum