PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.comp.lang.php > having problem getting php to connect
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
having problem getting php to connect

Réponse
 
LinkBack Outils de la discussion
Vieux 24/06/2007, 23h46   #9
gagal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: having problem getting php to connect



  Réponse avec citation
Vieux 25/06/2007, 00h02   #10
peter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: having problem getting php to connect


> $db_server = "localhost";
> $db_user = "smith_admin";
> $db_pass = "password";
> $db_name = "smith_website";
> $db_table = "blog_category";
> $db_table1 = "blog_entry";
> $db_table2 = "quotes";
> $db_table3 = "ab_category";
> $db_table4 = "ab_person";
>
> $connect = mysql_connect($db_server, $db_user, $db_pass) OR DIE ('I
> can not connect to server because: ' .mysql_errno(). " -
> " .mysql_error());
> mysql_select_db($db_name, $connect) OR DIE ('I can not connect to
> server because: ' .mysql_errno(). " - " .mysql_error());


Ahh yes my fault never noticed that.

The problem you have is similar to the $connect problem, the tables being
defined outside of the function, you will need to also pass them as a
parameter


  Réponse avec citation
Vieux 25/06/2007, 00h07   #11
gagal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: having problem getting php to connect

On Jun 24, 7:02 pm, "peter" <sub...@flexiwebhost.com> wrote:
> > $db_server = "localhost";
> > $db_user = "smith_admin";
> > $db_pass = "password";
> > $db_name = "smith_website";
> > $db_table = "blog_category";
> > $db_table1 = "blog_entry";
> > $db_table2 = "quotes";
> > $db_table3 = "ab_category";
> > $db_table4 = "ab_person";

>
> > $connect = mysql_connect($db_server, $db_user, $db_pass) OR DIE ('I
> > can not connect to server because: ' .mysql_errno(). " -
> > " .mysql_error());
> > mysql_select_db($db_name, $connect) OR DIE ('I can not connect to
> > server because: ' .mysql_errno(). " - " .mysql_error());

>
> Ahh yes my fault never noticed that.
>
> The problem you have is similar to the $connect problem, the tables being
> defined outside of the function, you will need to also pass them as a
> parameter


my gratitude forever that fixed it

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08702 seconds with 11 queries