Why not change your error message display so it's more informative? Instead of

die("Error in input query");

try this:

or die ("Error in input query: " . mysql_error() . "($query)</p>");

That way, you can see exactly what MySQL says the error was, and exactly how the query came out. It's really hard to debug this sort of thing without seeing the fully formed query.

-Alex

On Monday, December 2, 2002, at 09:34 PM, Jerry M.Howell II wrote:

Error in input query

******** start of php database code *********

$connection = mysql_connect("localhost", "hostbyk1_admin",
"<mypassword>") or
die("Invalid
server or user");
mysql_select_db("hostbyk1_order",$connection);

/******************************************************** *******
Make sure you replace USERS with your table name
***************************************************************/
$query = "insert into client
(  last_name,first_name,address,city,
state,country,zip,phone,email,
refer,ip_address,package,domain,color,due_date)ˇ
values('$last_name','$first_name','$address','$city',
'$state','$country','$zip','$phone','$email',
'$refer','$ip','$package','$domain','$color','$due_date')";
/* **************************************************************
this is what does the work, if you get this error, you know youˇ
connected to the dbase, but something is wrong with your query
***************************************************************/
$result = mysql_query($query,$connection)or die("Error in input
query");
******** End of php database code *********

as you can see the username is hostbyk1_admin

password I actualy changed for obvious reasons

the database I'm trying to acsess is hostbyk1_order

and the table name is client

I also tested it from the command line and can access the
database just fine
it might be a scripting error but I've searched the web for
templates and they
all seem to use this format so I'm stumped

On Mon, 2 Dec 2002 23:59:35 -0500
daniel <[EMAIL PROTECTED]> wrote:

this is a vague one , would be good to copy and paste the php debug message
===== Original Message From Jerry M. Howell II <[EMAIL PROTECTED]> =====
Hello all,

We are leasing a dedicated server and seem to pe having problems getting
our
php script working with mysql. The script was working fine with the last
server
we were on so I'm wondering if you all have any sugestions. We are hosting on
a
redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm

We have talked to the ppl that set the server up and they assure us it's a
scripting
error with our php file. That script I will save for the php list unless you
all feal
it's nessisary topost it here. Is there any permision issues I should look
into or
something they might have overlooked in the install? I apreciate any help I
can get
on this issue.

thnx
--
Jerry M. Howell II

---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




--
Jerry M. Howell II

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-
[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to