Re: creating the php search script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gab

Think your problem may be in the 
<< 1st_field like studentID='$studentsID', >> 
part of your query which will prevent it running, obviously then returning a 0 value for the number of rows

What exactly are you querying here? I assume you have a studentID column containing numeric student IDs - if so why the
<< 1st_field like  >>?

If the table contains a column named 1st_field by the look of your query it must also contain numeric student IDs - this is data duplication & generally considered to be bad database design practice.

The LIKE expression is utilised to find something similar, so wasted with a value that is unique (as I presume a Student ID is). Also the correct syntax for LIKE usage is %string, matching any sequence of zero or more characters, or _string, matching a single character.

Anyway, as to your non-running query, try removing 
<< 1st_field like  >>
& see what happens

Luck

Mark


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux