Empty Query
| From: | Richard Whitney | Date: | Tue, 25 Feb 2003 20:25:34 +0000 |
| Subject: | Empty Query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-137126@lists.php.net to get a copy of this message | ||
### I have this:
###
### 1111[serial]
### 1111[model]
### 1111[yr_blt]
### 1111[km]
### 1111[price]
### 1111[hours]
### 1111[details]
### 1111[location]
### double[style]
All of the 1 are the variables being passed, the word is hardcoded for clarity
What I get half the time: Couldn't insert dataQuery was empty
###
### The variables are obviously being passed
###
### Here's my insert query:
###
### if($img == ""){ $sql = "INSERT INTO vehicles (
id
,serial, model ,
### yr_blt , km , price , hours ,
details , location , img,
### tstamp,
### style)
### VALUES ('', '$serial',
'$model', '$yr_blt', '$km', '$price',
### '$hours',
### '$details', '$location', '0', '$tstamp',
'$style');";
### }
### else
### {
###
###
$file_dir="/services/webpages/o/f/offroad-imports.com/public/uploads/mogs/$serial";
### if (!is_dir($file_dir)){
### umask(000);
### mkdir($file_dir,0777);
### }
### else{
### umask(000);
###
### $path = $file_dir . "/1.jpg";
### move_uploaded_file($img, $path)or die('Could not upload photo');
### $sql = "INSERT INTO vehicles ( id ,serial,
model , yr_blt ,
km
### ,
### price , hours , details , location ,
img, tstamp, style)
### VALUES ('', '$serial',
'$model', '$yr_blt', '$km', '$price',
### '$hours',
### '$details', '$location', '1', '$tstamp',
'$style');";
### }
###
### }
Any thoughts? Enlightenment?
Thanks
--
Richard Whitney *
Transcend Development
Producing the next phase of your internet presence.
rw@xend.net *
http://xend.net *
602-971-2791
* * *
* * *__ * *
_/ \___ *
* / * \* *
*/ * * \
* */\_ |\
/ \_ / \
/ \____/ \
/ \
/ \
/ \