Re: search of data base - again

Gonzalo <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAPi3GkeSjQab2rAw_DJ03KaR3xd5iL+-EOyTp5iWW3sOaFEa6Q@mail.gmail.com>
Why don´t you echo the $sql2 to see the query. That´s would be very
helpful. Also, are you closing the ')' in the 'values'?

Greetings

On Fri, Mar 30, 2012 at 3:55 PM, Gavin <[email protected]> wrote:

> |DATE| <http://dev.mysql.com/doc/**refman/5.5/en/datetime.html<http://dev.mysql.com/doc/refman/5.5/en/datetime.html>>
> => MySQL permits some keywords to be used as unquoted identifiers because
> many people previously used them. Examples are those in the following list:
>
>  *
>
>   |ACTION|
>
>  *
>
>   |BIT| <http://dev.mysql.com/doc/**refman/5.5/en/numeric-types.**html<http://dev.mysql.com/doc/refman/5.5/en/numeric-types.html>
> >
>
>  *
>
>   |DATE| <http://dev.mysql.com/doc/**refman/5.5/en/datetime.html<http://dev.mysql.com/doc/refman/5.5/en/datetime.html>
> >
>
>  *
>
>   |ENUM| <http://dev.mysql.com/doc/**refman/5.5/en/enum.html<http://dev.mysql.com/doc/refman/5.5/en/enum.html>
> >
>
>  *
>
>   |NO|
>
>  *
>
>   |TEXT| <http://dev.mysql.com/doc/**refman/5.5/en/blob.html<http://dev.mysql.com/doc/refman/5.5/en/blob.html>
> >
>
>  *
>
>   |TIME| <http://dev.mysql.com/doc/**refman/5.5/en/time.html<http://dev.mysql.com/doc/refman/5.5/en/time.html>
> >
>
>  *
>
>   |TIMESTAMP| <http://dev.mysql.com/doc/**refman/5.5/en/datetime.html<http://dev.mysql.com/doc/refman/5.5/en/datetime.html>
> >
>
> Best Regards,
>
> Gavin
>
>
> On 30/03/2012 19:48, Lars Nielsen wrote:
>
>> fre, 30 03 2012 kl. 20:00 +0200, skrev Matijn Woudt:
>>
>>> On Fri, Mar 30, 2012 at 7:49 PM, Jim Giner<jim.giner@**
>>> albanyhandball.com <[email protected]>>  wrote:
>>>
>>>> ""Jim Giner""<jim.giner@**albanyhandball.com<[email protected]>>
>>>>  wrote in message
>>>> news:**E44A0D84E492452DAB2BDEBC4C4B8A**58@laptop2...
>>>>
>>>>> ===============
>>>>> Martijn&  Jim -
>>>>>
>>>>>
>>>>> Is it just the date that is the problem?
>>>>>
>>>>> Yes.
>>>>>
>>>>> Tru dat.  But mySql doesn't want the dashes embedded.  The format
>>>>> string
>>>>> should be "Ymd" instead.
>>>>>
>>>>> That's what I am doing.  No luck.
>>>>>
>>>>> Ethan
>>>>>
>>>>> *****
>>>>> You're using a format with just Ymd in it (no dashes)?  Can you post
>>>>> *just* the query as it is looks in your php code?
>>>>>
>>>>>
>>>>>
>>>>>  While waiting - I looked at your code again.  What is the (greater
>>>> than)
>>>> symbol doing in front of your $Date var?
>>>>
>>>>> Date) VALUES(null, '$Site', '$MedRec', '$Notes', $Weight, $BMI,>
>>>>>> '$Date'";
>>>>>>
>>>>> Also - is it valid to use the word 'Date' as a field name?  Just
>>>> wondering.
>>>>
>>> It is valid, though It may require quotes (backtick ?)
>>>
>>>  Hi,
>>
>> Have you tried to write out the generated sql with var_dump() and then
>> feed it to an SQL interface? By using Mysql Query Browser you can easily
>> check it the sql-string is correct.
>>
>> Regards
>> Lars Nielsen<[email protected]>
>> LFWeb
>>
>>
>>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.