RE: Dynamic SQL

2002-03-04 Thread Trelfa, Jonathon
Try using something a little different: if ($surname_all){ //checks to see if the variable is set $surname_query = "WHERE surname between $surname_from and $surname_to"; } else { $surname_query = ""; } -Original Message- From: Craig Shepherd [mailto:[EMAIL PROTECTED]] Sent: Monday, Mar

RE: text data cut off at space

2002-03-04 Thread Trelfa, Jonathon
You have to enclose the data in quotes or it cuts off at the first space. Example: $resultID = mysql_query("INSERT INTO data_table (name, address) VALUES ($name, $address)",$connect); This will cut off the text at the first space in the text field This is the method that worked for me: $result

Complex query with PHP/MySQL

2002-03-01 Thread Trelfa, Jonathon
I am attempting to generate a query statement (using PHP) that is generated based on user input from 2 sets of checkboxes. You can see a barely-functioning version at this URL: http://www.nobleaccord.com/view/view.php The top part of the form just shows what the query statement looks like. The