40esp Posted June 8, 2008 Share Posted June 8, 2008 Right now im doing a job for a company that did not like the high prices of the web designer that they where with, so they approached me to redesign it. Well the prior website was asp, and i said php is better, so im doing it in php. Well, i've hit a stump, In their database they have a newsletter table with name email blah blah, and then its got the newsletters signed up for column, with data like: [2], [19], [14], [26], [18]. Im assuming its an array of data, for newsletters. How would i filter out array data like this? for example $newsletter1= $_GET['some_id']; and so so. based on the get id, I want to display all signees with the newsletter id of [2]. I hope i have explained this well, how would i approach this? Link to comment https://forums.phpfreaks.com/topic/109305-solved-newsletter-help/ Share on other sites More sharing options...
rarebit Posted June 8, 2008 Share Posted June 8, 2008 is this a single string? "[2], [19], [14], [26], [18]" Link to comment https://forums.phpfreaks.com/topic/109305-solved-newsletter-help/#findComment-560705 Share on other sites More sharing options...
40esp Posted June 8, 2008 Author Share Posted June 8, 2008 yes it is. What I have is an admin panel with an option to select the type of newsletter. When you go to the new page a GET id is sent, that page then filters through all of the newsletter signups table in mysql. if the get id equals one of the [#]'s in a row it displays that record otherwise it doesnt. I do not know how to approach this. Link to comment https://forums.phpfreaks.com/topic/109305-solved-newsletter-help/#findComment-560712 Share on other sites More sharing options...
rarebit Posted June 8, 2008 Share Posted June 8, 2008 $n = 3; $s = "SELECT * FROM atable WHERE newsletters LIKE '%[".$n."]%' "; or NOT LIKE Link to comment https://forums.phpfreaks.com/topic/109305-solved-newsletter-help/#findComment-560715 Share on other sites More sharing options...
40esp Posted June 8, 2008 Author Share Posted June 8, 2008 OOO That sparked an idea in my head! Thank you so Much! Link to comment https://forums.phpfreaks.com/topic/109305-solved-newsletter-help/#findComment-560720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.