vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do i copy SomeField of SomeTable data to... (https://vborg.vbsupport.ru/showthread.php?t=120286)

Aou_Student 07-04-2006 03:11 AM

How do i copy SomeField of SomeTable data to...
 
Hello friends,

Im asking, How can I copy SomeField of SomeTable data to AnotherField of AnotherTable?

Means Im searching for a code that Select data from someField and insert it into AnotherField!

I`ll be grateful if you help me.

Also I need a code that deals with the quotation mark as string (data) not a quotation mark! so It wont break the php code when it`s part of the data to be dealt with.

For Example: When I excute this code "INSERT INTO SomeTable `SomeField` VALUES ('Alen's Site');"

I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Site');' at line 1.

The quotation mark in (Alen's Site) are dealt with as part of the php code NOT as part of the data to be inserted! I need to fix this some how.

harmor19 07-05-2006 01:30 PM

What code are you using to insert data into the table?
If you wrote it using vBulletin's functions it should work.

Paul M 07-05-2006 05:19 PM

You need to escape the single quote in Alen's.

Aou_Student 07-05-2006 09:23 PM

Quote:

Originally Posted by Paul M
You need to escape the single quote in Alen's.

I dont want to lose the single quote! how can that be done without losing it?

Paul M 07-05-2006 10:02 PM

I didn't say lose it, you need to escape it using the escape_string() function. :)

Aou_Student 07-05-2006 10:16 PM

Quote:

Originally Posted by Paul M
I didn't say lose it, you need to escape it using the escape_string() function. :)

ok Paut I get what you mean, But I dont know how to use the escape function! I`ll be gratefull if teach me that.


All times are GMT. The time now is 05:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00961 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete