* Thus wrote Ustimenko Alexander: > read mysql manual: you must replace ' to ` > > ''''''''''''''''''''''''''''''''''''''''''''' to > `````````````````````````````` in your $sql so
um.. what is with all of these qutes? > > $sql = "SELECT id_from, id_to FROM ids WHERE id_from =`$current_id` OR > id_to=`$current_id`"; This is wrong. Seing that this is mysql, a sequence of characters enclosed within `` will be thus considered as a database token and not as a value. Which will result with something like: "Unkown column name '1234'" if $current_id == 1234 > > or more intelligent without ``````````` in your $sql so > > $sql = "SELECT id_from, id_to FROM ids WHERE id_from =$current_id OR > id_to=$current_id"; > > because for ANY SQL DATABASE IN THIS WORLD something without " ' ` is > integer (your ids is integers???? :) ) I can name a couple that this isn't allowed, but besides that, not putting quotes around a value doesn't make it an integer. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php