Changeset 21793 for extensions/WiredForSound/admin/add_page_on_index.php
- Timestamp:
- Mar 22, 2013, 10:17:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/WiredForSound/admin/add_page_on_index.php
r3609 r21793 34 34 35 35 $q = 'SELECT id FROM ' . WFS_SOUNDS_TABLE . ' WHERE file = "' . $_POST['mp3_select'] . '";'; 36 $result = mysql_fetch_assoc(pwg_query($q));36 $result = pwg_db_fetch_assoc(pwg_query($q)); 37 37 38 38 if (empty($result)) 39 39 { 40 40 $q = 'SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id FROM ' . WFS_SOUNDS_TABLE . ' ;'; 41 list($next_element_id) = mysql_fetch_array(pwg_query($q));41 list($next_element_id) = pwg_db_fetch_row(pwg_query($q)); 42 42 $q = 'INSERT INTO ' . WFS_SOUNDS_TABLE . ' ( id , file ) VALUES ( ' . $next_element_id . ' , "' . $_POST['mp3_select'] . '");'; 43 43 pwg_query($q); … … 56 56 ON sound.id = ic.sound_id 57 57 WHERE ic.cat_id = ' . $cat_id . ' AND ic.image_id IS NULL;'; 58 $result = mysql_fetch_assoc(pwg_query($q));58 $result = pwg_db_fetch_assoc(pwg_query($q)); 59 59 60 60 // Bouton de suppression
Note: See TracChangeset
for help on using the changeset viewer.