Re: [PHP-DB] mysql_query

2011-06-06 Thread Niel Archer
> 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

Re: [PHP-DB] mysql_query returning empty result after DELETE

2009-09-14 Thread Chris
Stan wrote: 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. According to the docs mysql_query only returns false if there's an error.

Re: [PHP-DB] mysql_query returning empty result after DELETE

2009-09-14 Thread Stan
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 PH

Re: [PHP-DB] mysql_query returning empty result after DELETE

2009-09-14 Thread Stan
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

Re: [PHP-DB] mysql_query returning empty result after DELETE

2009-09-13 Thread Chris
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 {

Re: [PHP-DB] mysql_query

2009-08-10 Thread Phpster
On Aug 10, 2009, at 4:15 AM, "Ron Piggott" 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 mysql_query, in order to trigger

Re: [PHP-DB] mysql_query

2004-10-12 Thread Philip Thompson
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) values('$im

RE: [PHP-DB] mysql_query

2004-10-12 Thread Murray @ PlanetThoughtful
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 = $_GET['

Re: [PHP-DB] mysql_query

2004-10-12 Thread bbonkosk
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

RE: [PHP-DB] mysql_query troubles

2001-07-17 Thread Karl Phillipson
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 wil

RE: [PHP-DB] mysql_query returns nothing?

2001-07-05 Thread Mark Roedel
> -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 t

Re: [PHP-DB] mysql_query failure

2001-02-16 Thread Russ Michell
>$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: