Jump to content

elyfrank

Members
  • Posts

    45
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

elyfrank's Achievements

Member

Member (2/5)

0

Reputation

  1. I get this error: Error updating record: Table 'wordpress_i12dhflgoa.postmeta' doesn't exist Here is the code I am using: $sql="update `wp_pzvy_postmeta` set meta_value = '10' where meta_key = '_price' AND post_id=(select post_id from postmeta where meta_key = '_sku' and meta_value = 'GF-1370')";
  2. The thing is that I am doing this out of wordpress, it is a separate script running in the server. Hey, Thank you very much for all your help, I will try this out this afternoon and let you know if everything works ok.
  3. How can I get the post_Id based on the meta_value? In this case meta_value is GF-1370? Thank you
  4. This is the table from myphpadmin. It looks like it got reformatted when I originally posted. meta_id post_id meta_key meta_value 18538 4356 _sku GF-1370 18541 4356 _price 2.343
  5. Hi, I changed the code a bit and tried to execute it and I am getting this error: Error updating record: Unknown column '_sku' in 'where clause' Here is the code <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $sql="update `wp_pzvy_postmeta` set `_price` = 5 WHERE `_sku` = 'GF-1370'"; if (mysqli_query($conn, $sql)) { echo "Record updated successfully"; } else { echo "Error updating record: " . mysqli_error($conn); } mysqli_close($conn);
  6. Hi guys, I have a problem with my code. It connects with the database but it doesn't execute anything. I am trying to update a value in a table but I really don't know what I am doing wrong. I am trying to change the price based on the meta_value GF-1370 Thank you very much. Here is Table (Taken from myphpadmin) meta_id post_id meta_key meta_value 18538 4356 _sku GF-1370 18541 4356 _price 2.343 and here is my code: <?php $link = mysql_connect('server', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db(wordpress_i12dhflgoa); $sql="update `wp_pzvy_postmeta` set `_price` = 5 WHERE `_sku` = 'GF-1370'"; ?>
  7. I just fix it. Thank you guys. $result = mysql_query("UPDATE wp_usermeta SET meta_value='0' WHERE meta_key = 'wp_s2member_login_counter';")
  8. Hi guys, I know a little bit of PHP but I am very new to mysql. How do I change the value (meta_value) of all the wp_s2member_login_counter in this table (wp_usermeta) using php? Thank you very much! This is what I got so far: <?php // Connect to MySQL $link = mysql_connect('mywebsite.com', 'wrd6rEDgggy', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db(wrd_47io4f3a6l); $result = mysql_query("UPDATE wp_usermeta SET wp_s2member_login_counter='0'") or die(mysql_error()); ?>
  9. Hi guys, I managed to write this script to open a link in internet explorer close it and open another one. I would like to have all my links in a different txt files with multiple links line by line and be able to do the same function reading it from the bat file I will appreciate anybody that can help me with this. This is the bat file I made which works great. It opens these two llinks one at a time and do some stuff. @echo off start /MIN iexplore.exe www.website1.com ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 tskill iexplore /A RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 start /MIN iexplore.exe www.website2.com ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 ping 192.178.1.1 -w 1 tskill iexplore /A RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 Thank you very much
  10. Requinix, I used this RedirectMatch (example-)*\.html$ http://www.example.com$1.html And the output was: www.example.com.html At least it is recognizing the beginning of all my urls but I am missing something.
  11. How can I do it with redirect match? Thank you
  12. The .htaccess and the files are in the same folder. I know the htaccess is working because all the lines above and below that are doing what they suppose to do.
  13. Requinix, Thank you for the quick response, however for some reason this is not working for me. (it doesn't redirect) this is my htaccess code Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] RewriteEngine on RewriteRule ^example-(\d+)\.html$ /$1.html [L,R] addtype application/x-httpd-php .html AddHandler x-httpd-php .html AddType application/x-shockwave-flash .swf
  14. Hi guys, I have several urls that I would like to redirect using one line in my .htaccess example: http://www.example.com/example-1.html redirect to http://www.example.com/1.html I just pretty much want to take out the beguining (example-) of multiple urls Thank you very much.
×
×
  • 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.