Reply to PHP & MySQL skip problem

Your name:

Reply:


Posted by Otto on 11/03/05 20:29

Hello,
I have the following script to move forward or backward to
one record.
Every thing work well. Only with the forward button and
when the field NOM have one apostrophe ' inside, the skip
process stop.

Regards

Otto

Part of the Script
******************
...
If (isset($_GET['avant_x'])) {
// Action sur le bouton suivant
$mes = "Suivant";
$query = " SELECT ID, NOM
FROM adresse
WHERE (nom > '$last_nom') OR (nom =
'$last_nom' AND id > $last_id)
ORDER BY nom ASC, id ASC LIMIT 1";

extract(mysql_fetch_array(mysql_query($query)));
}

elseif (isset($_GET['arriere_x'])) {
// Action sur le bouton précédent
$mes = "Précédent";
$query = " SELECT ID, NOM
FROM adresse
WHERE (nom < '$last_nom') OR (nom =
'$last_nom' AND id > $last_id)
ORDER BY nom DESC, id DESC LIMIT 1";

extract(mysql_fetch_array(mysql_query($query)));
}
...

...
<Form action...
<input type="image" src="images/co_arriere.png"
name="arriere">
<input type="image" src="images/co_avant.png"
name="avant">
...
</Form>
...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация