Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / General DB Topics / March 2005

Tip: Looking for answers? Try searching our database.

Problem of executing query in mysql server through php

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kthayapararajh@gmail.com - 29 Mar 2005 04:54 GMT
I maintain a website (<a>www.pdn.ac.lk/eng/pefaa</a>) it uses mysql &
php. i comleted before 1 week & it worked fine. But today morning the
search link (<a>www.pdn.ac.lk/eng/pefaa/search/</a>)prompt the failure
message that i put in the die part of the fuction mysql_db_query for
any search. that line is here
$rid = mysql_db_query("pefaa", "$query")
    or die("Query failed! Change the search criterion and try again!");

But i can execute the queries by connecting mysql server through shell.

what is the problem?. Please help me in this regard. My Client ask me
to fixed it immediately.
Benjamin Gufler - 29 Mar 2005 14:03 GMT
> I maintain a website (<a>www.pdn.ac.lk/eng/pefaa</a>) it uses mysql &
> php. i comleted before 1 week & it worked fine. But today morning the
[quoted text clipped - 3 lines]
> $rid = mysql_db_query("pefaa", "$query")
>     or die("Query failed! Change the search criterion and try again!");

Don't you think it would be quite useful for us to have
- the query you try to execute
- the structure of the relevant tables
- maybe the way you build the query?

> But i can execute the queries by connecting mysql server through shell.

Are you sure you try to execute the *same* query, not just the query you
 *think* your php script produces?

> what is the problem?. Please help me in this regard. My Client ask me
> to fixed it immediately.

Of course your client did so. I would do so, too ;)

greets,
    Benjamin
Signature

Please compose your messages as plaintext,
and do not send MS Office attachments:
  http://www.efn.no/html-bad.html
  http://www.goldmark.org/netrants/no-word/attach.html

Benjamin Gufler - 29 Mar 2005 14:06 GMT
> $rid = mysql_db_query("pefaa", "$query")
>     or die("Query failed! Change the search criterion and try again!");

Btw, two lines from the php manual:
Note:  This function has been deprecated since PHP 4.0.6. Do not use
this function. Use mysql_select_db()  and mysql_query() instead.

It's a really bad idea to use deprecated function in a new product...

Benjamin
Signature

Please compose your messages as plaintext,
and do not send MS Office attachments:
  http://www.efn.no/html-bad.html
  http://www.goldmark.org/netrants/no-word/attach.html

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.