Back to the month index |
Back to the list index
|
Steve Lawrence (lawst@discoveryweb.com)
Tue, 24 Sep 1996 22:10:24 -0600
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Steve Lawrence: "Re: [mSQL] w3msql type conflict?"
- Previous message: Steve Lawrence: "Re: [mSQL] alternative admin tools?"
- Maybe in reply to: Joshua S. Freeman: "[mSQL] alternative admin tools?"
- Next in thread: rasmus@bellglobal.com: "[mSQL] Re: [PHP] PHP to mSQL connection - what am I missing? Please help."
From: lawst@discoveryweb.com (Steve Lawrence) Subject: Re: [mSQL] [w3-msql] HELP WITH QUERY... Date: Tue, 24 Sep 1996 22:10:24 -0600 Message-Id: <19960925042353.AAA19522@steve-home.discoveryweb.com>>
> <!msql if ($nombre_grupo!="")>
> <!msql query "SELECT DISTINCT materia, maestro, periodo, area,
> clasificacion, fecha FROM grupos WHERE materia=$nombre_grupo
> ORDER BY materia" r1>
> <TR>
> <!msql print_rows r1 "<TD>@r1.0<TD>@r1.1<TD>@r1.2<TD>@r1.3
> <TD>@r1.4<TD>@r1.5</TR>">
> <!msql fi>
>
> $nombre_grupo is the name of a menu in a Search form...
> And I get the following error message:
>
> W3-mSQL Error ! - mSQL Database Error
> Error at line 29
>
> parse error near "Artificial"
>
Try enclosing the variable @nombre_grupo like this in your query:
materia='$nombre_grupo'
Your whole query should look like this:
<!msql query "SELECT DISTINCT materia, maestro, periodo, area,
clasificacion, fecha FROM grupos WHERE materia='$nombre_grupo'
ORDER BY materia" r1>
It seems that when testing field which are char() types, you have to put
the "divits" (I don't know what they are called, officially, sorry!) around
your variable. When using int (or real?) types you don't use the divits.
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Steve Lawrence: "Re: [mSQL] w3msql type conflict?"
- Previous message: Steve Lawrence: "Re: [mSQL] alternative admin tools?"
- Maybe in reply to: Joshua S. Freeman: "[mSQL] alternative admin tools?"
- Next in thread: rasmus@bellglobal.com: "[mSQL] Re: [PHP] PHP to mSQL connection - what am I missing? Please help."