Hello all,
Not sure what I am doing wrong.
I have a simple form that populate the variables in a mysql query. I
know the selected values are making it to the form porcessing script
because I can echo them on the processing script as indicated below.
You Selected Cell_Sect = 1_1
You
Yes. I deleted all records.
Prior to the DELETE, if I did a SELECT with specific criteria (WHERE
p.pictureFile = some valid content), and those criteria were not met,
mysql_query() returned False ... and, conversely, if those criteria were
met, mysql_query() returned a resource against which I
OK.
If I change the test to if(mysql_num_rows($thisRow) 1) it does what I
want.
I guess if I want to understand why False was returned originally (just
after I created the database) I need to start over.
Do I have 4 possible conditions here: 1) the mysql_query() function fails
and I get a PHP
Stan wrote:
I did a DELETE FROM picture where picture is a table in my database.
Because this deletes all your records - so doing a select afterwards
will find nothing.
Afterward, this piece of code does not generate an error
--
try
{
On Aug 10, 2009, at 4:15 AM, Ron Piggott
ron@actsministries.org wrote:
I have the syntax
mysql_query(INSERT INTO ););
If this is successful I want to do update a column in one of my tables
$query = UPDATE ... ;
mysql_query($query);
How do I test if the INSERT INTO
1. place your query string into a variable for easy dumping...
i.e. $query = insert into obiskovalci (ime, priimek, ulica, hstevilka,
pstevilka, posta) values('$ime', '$priimek', '$ulica',
'$hstevilka', '$pstevilka', '$posta');
echo $query;
(See if there are problems
Hi,
Unless you have 'register globals' on, are you retrieving the value of the
variables passed by your form from the $_GET or $_POST super variables
(whichever is appropriate)?
In other words, at the top of the page that is performing your insert query,
do you have lines such as:
$ime =
On Oct 12, 2004, at 7:15 AM, [EMAIL PROTECTED] wrote:
hello,
I have a begining question.
I've got simple html form and php script, but insert doesn' t work.
What is
wrong in my insert mysql_query?
mysql_query( insert into obiskovalci (ime, priimek, ulica, hstevilka,
pstevilka, posta)
Brad,
Have you defined the database variable you are connecting to?
ie: $DB=your_database_name; and then connecting:
if(!($testResult = mysql_query($DB, SELECT * FROM login_table where Pass =
password('$password'
try the code snippet below and see if it spits an error at you - you will
-Original Message-
From: Stefan Siefert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 04, 2001 9:07 AM
To: PHP Mailingliste
Subject: [PHP-DB] mysql_query returns nothing?
Hm, since we are using PHP 4.0.6 we do get sometimes no
returnvalue...(function mysql_query) I think,
$con = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS)
or die ("Cant connect");
mysql_select_db($DB_NAME);
Try:
$con = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS)
or die ("Cant connect");
mysql_select_db($DB_NAME, $con);
Also try and make your php functions like so: mysql_x() instead of:
11 matches
Mail list logo