Jump to content

Newbie help


daleGT

Recommended Posts

Hey People.

Im obviously a newbie.

Can someone help me with an sqlget

 

This is what im currently using (it worked fine until people have added so many records it takes awhile to load)

$sqlget = "SELECT * FROM `XAGT` WHERE `input_body` = 'sedan' ORDER BY `input_build` ASC";

 

Now what im trying to do is filter it by year

"input_vin" records are in a format like "JG33Mabcdefg"

the portion of the record that is equal to a year is

"JG33M" = 1972 for example.

 

So im trying to pull out just 1972 records.

 

trying something like

$sqlget = "SELECT * FROM `XAGT` WHERE `input_body` = 'sedan' WHERE `input_vin` = 'JG33M' ORDER BY `input_build` ASC";

 

any help would be great

Link to comment
https://forums.phpfreaks.com/topic/274419-newbie-help/
Share on other sites

Paul thanks for the response

$sqlget = "SELECT * FROM `XAGT` WHERE `input_body` = 'sedan' WHERE `input_body` LIKE 'JG33M%' ORDER BY `input_build` ASC";

gives an error getting (not sure if its because i gave you the wrong details in the first post) input_vin is supposed to be input_body, I did try to edit the post!

 

I tried this based on your last post.

$sqlget = "SELECT * FROM `XAGT` WHERE `input_body` = 'sedan' LIKE `input_build` = 'JG33M%' ORDER BY `input_build` ASC";

 

it does not return any records - but without error

i checked the field & data and i do have results that should show up!

Link to comment
https://forums.phpfreaks.com/topic/274419-newbie-help/#findComment-1412107
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.