473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MySQL server version for the right syntax to use near '' at line 1

I have problem login to my system after upgrading php5.2.6 to 5.3.xx. something wrong with my code?
tq

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. # FileName="Connection_php_mysql.htm"
  3. # Type="MYSQL"
  4. # HTTP="true"
  5. //$hostname_contmjportal = "localhost";
  6. //$hostspec_contmjportal = "localhost";
  7. //$database_contmjportal = "tmjportal";
  8. //$username_contmjportal = "root";
  9. //$password_contmjportal = "jjdt17";
  10.  
  11. $conf['settings']['database']['type'] = 'mysql';
  12. $conf['settings']['database']['user'] = 'root';        // database user with permission to the booked database
  13. $conf['settings']['database']['password'] = 'jjdt17';
  14. $conf['settings']['database']['hostspec'] = 'localhost';        // ip, dns or named pipe
  15. $conf['settings']['database']['name'] = 'tmjportal';
  16.  
  17. $hostname_contmjportal = $conf['settings']['database']['hostspec'];
  18. //$hostspec_contmjportal = "localhost";
  19. $database_contmjportal = $conf['settings']['database']['name'];
  20. $username_contmjportal = $conf['settings']['database']['user'];
  21. $password_contmjportal = $conf['settings']['database']['password'];
  22.  
  23. //resource mysql_pconnect ([ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, int $client_flags = 0 ]]]] )
  24. //resource mysql_pconnect($hostname_contmjportal, $username_contmjportal, $password_contmjportal) or trigger_error(mysql_error(),E_USER_ERROR);
  25.  
  26. $contmjportal =  mysql_pconnect($hostname_contmjportal, $username_contmjportal, $password_contmjportal) or trigger_error(mysql_error(),E_USER_ERROR);
  27. ?>
Mar 30 '17 #1
1 1334
Dormilich
8,658 Expert Mod 8TB
something wrong with my code?
enable error reporting and PHP tells you everything that is not correct.
Mar 31 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Carl | last post by:
Can you tell me what is wrong with this syntax ? string select = "UPDATE .. " + "(,,,,,,, ,,,, ,,, , , , ) " + " VALUES (@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
2
by: PythonistL | last post by:
I have MySql server version: 5.0.22-community-nt. When I try to import data with this command mysql --default-character-set=utf8 mimi < c:\django\mujserver\mimi.sql I will get the error ...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
10
by: bobf | last post by:
I am using a program 'My Contact Table' which is a code generator program. It allows you to easily create a PHP/MySQL web application without writing any code. I am trying to create an additional...
9
by: icemaster451 | last post by:
Hello im making a browser game and have 99% working but iv got one error i cant find / fix and would like to know if anyone can help me where im going wrong heres the error QUERY ERROR: You have an...
43
by: dougancil | last post by:
Can someone please review my code and see where I can be missing information. I get the following error: Line 1: Incorrect syntax near ','. Unclosed quotation mark before the character string '...
3
by: qdoet | last post by:
I'm newbie and I had a problem on my SQL syntax like this You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...
2
by: Lerato Mphaka | last post by:
Hi, I just migrated a MySQL database from my test server to my production Server with success. This database ia a backend for a .net application Im running. Now the problem is that when I try to...
3
by: mckin | last post by:
Does anybody know how solve this error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 here...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.