|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#9 |
|
Messages: n/a
Hébergeur: |
|
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
> $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 |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
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 |
|
![]() |
| Outils de la discussion | |
|
|