Jump to content

gdfhghjdfghgfhf

Members
  • Posts

    218
  • Joined

  • Last visited

Everything posted by gdfhghjdfghgfhf

  1. $sql = "SELECT * FROM pick AS p, table2 AS t ORDER BY pick.name ASC";
  2. here is the code: $a = $row["options"]; $ary = unserialize($a); $ary[] = $title; $b = serialize($ary); $zxc = "UPDATE quebec_calendarcustomfield SET options = '$b' WHERE calendarcustomfieldid = '1'"; so the sql query will look like this UPDATE quebec_calendarcustomfield SET options = 'a:4:{i:1;s:7:"option1";i:2;s:7:"option2";i:3;s:7:"option3";i:4;s:3:"etc";}' WHERE calendarcustomfieldid = '1' see?
  3. i'm tyring to do an UPDATE on a field and i want to put a serialized string.... so it includes double quotes and others weird symbols.... so it's breaking my sql query how can i solve this? i need to preserve the syntax of my serialized string with the double quotes intact or else it wont work right
  4. ok i have a weird problem, i don't know how to explain it so here is my situation: I have a page to add events on a calendar for music shows (a form with a submit button)... On this page, the users adding an event must select the bands from a listbox. This listbox displays the bands from a table in my database. If a band present in this show is not listed, the users can click a link that will open a popup (i can put it on the same page too), and they can add a band to the database, so it will be listed with the others in the listbox. My problem is that after the band is added to the database, my users dont see it in the listbox unless they refresh the page, and if they do they will loose all datas they entered (descriptions, flyer, date, category, etc) How could I avoid this? I thought about javascript, but since the content of the listbox is from a SQL query, it won't work right? I thought about putting the listbox inside a iFrame, but then it won't be included in the form since it's a different page... any suggestions?
  5. Hi, I have a french and an english version of my website would it be possible to detect the current language used and use javascript to redirect to a page depending on browser or os's language? could someone please explain me how? thanks!
  6. i'm trying to UPDATE on multiple rows at once... i saw an example on the net but it gives me a sql error $query = "UPDATE news3 SET (valide,localisation,addresse,google) VALUES ('1','$localisation','$addresse','$google') WHERE id = '$band'"; all variables are $_POST values and i verified them all
  7. wonderful! exactly what i wanted to do thanks a lot
  8. hmm now i get something weird how can i take out the useless stuff id like it to appear as
  9. i have an entry in my database with a lot of serialized things it looks like this: a:2:{i:1;s:6:"blablablabla1";i:2;s:6:"blablablabla2";} i'm trying to make it more human-readable, and i would also make each word linkable so instead of the serialized thing it would look like this: <a href="blablablabla1.php">blablablabla1</a><br> <a href="blablablabla2.php">blablablabla2</a><br> but i can't even manage to unserialize it i tryed with this: but it always returns "Array" nothing else... it just displays the word Array could someone help me please?
×
×
  • 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.