![]() |
Hey there, my PHP friends. Help please =)
I'm having trouble with spaces within mysql table contents.
Everything pulls from the database fine, spaces and all... when I pull using an integer associated with that particular row, now when I try and pull from the database based upon a string with a space, it does not seem to pull the entire sting. Just the data before the space. For instance, when I try to select and pull "AMC - Gremlin".. I get Unknown column 'AMC' in 'where clause' Here is the start: Code:
$query = "SELECT * FROM BAMFG_vehicle"; Code:
<form action="bamfg_vehicle.php?do=search_vehicle" method="post" enctype="multipart/form-data"> Here is my query code: Code:
if($_REQUEST['do'] == 'search_vehicle') { |
The value needs quotes around it, so something like:
Code:
$query = "SELECT * FROM BAMFG_vehicle WHERE make_model = '$make_model'"; |
Thanks for the help before, I have one more thing kicking my butt though..
my output code Code:
$output2 .= "<OPTION VALUE=".$row['make_model'].'>'.$row['make_model'].""; Code:
<OPTION VALUE= AMC - Gremlin> AMC - Gremlin |
Try this:
PHP Code:
|
That worked perfectly, thank you much.
You have helped me several times with random questions here and I really appreciate the time you take! I'm slowly learning. |
All times are GMT. The time now is 12:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|